Survey123 - Working with GUIDs in the Instance Name, How to Reduce the characters

779
1
07-28-2021 11:20 AM
Sean_McKinney
New Contributor

I'm currently trying to create a ticketing system in which a work order is created, and thus a globalid is generated after the survey is submitted.  Then use a second survey, created using the same service and opened through an inbox, to fill out the last remaining data for the work order.

I'd like to be able to populate the inbox instance name with a reduced version of the global GUID.  I can currently get the globalid to populate in the instance name, but can't figure out the formula to reduce the string.

EX:  concat("Work Order Number: ",substr(${globalid},0,5),", ",${address})

concat("Work Order Number: ",substr(string(${globalid},0,5)),", ",${address})

I'd like the instance name to read something like, Work Order Number: 8C903, 29 Cherry Ln

 

Any help would be appreciated.

0 Kudos
1 Reply
JamesTedrick
Esri Esteemed Contributor

Hi @Sean_McKinney ,

There is not currently a way to directly access the Global ID in a calculation (including the instance_name calculation).  As the globalID is a system-managed GUID, we generally suggest that it not be used in user-facing applications (similarly, you shouldn't use the ObjectID as well); instead, create an ID field that can be controlled by GIS admins/users.  If you want to use an GUID-style ID, that can be generated in Survey123 via the uuid() function.

0 Kudos