Select to view content in your preferred language

convert Guid to readable text in pop-up

492
2
Jump to solution
04-27-2023 09:14 AM
by Anonymous User
Not applicable

I am configuring a map in ArcGIS Online that includes a Workforce Assignments layer. In the map pop-ups I would like to convert some of the Guid fields (workerid, assignmenttype) into a readable format. I have tried the following Arcade expressions without success:

 

if ($feature.workerid == "{97dfbbb5-dd72-47ba-8696-b7ca9f546171}"){
return "Sarah"}
if (Guid($feature.workerid) == "97dfbbb5-dd72-47ba-8696-b7ca9f546171"){
return "Sarah"  
}

 

 The new Worker Name field doesn't populate. 

SHartholt_0-1682612009349.png

How can this be accomplished?

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

there does not appear to be curly brackets in the field for workerid.

All of these work for me:

 

if ($feature.workerid == "97dfbbb5-dd72-47ba-8696-b7ca9f546171"){
return "Sarah"}

 

or, can be handled with Decode.  Might be easier depending on how many workers you have:

 

Decode($feature.workerid, "e4e30100-aaf1-4567-bc6f-2393b779e367", "Sarah",
       "esf30100-aaf1-4567-bc6f-239sfd45874", "George", $feature.workerid)

 

or using When:

 

When($feature.workerid == "e4e30100-aaf1-4567-bc6f-2393b779e367","Sarah",
      $feature.workerid == "e4e30100-aaf1-4567-bc6f-2393b779e367","George", "Other") 

 

R_

View solution in original post

2 Replies
ArmstKP
Regular Contributor

@Anonymous User can you try:

IIF(Find('{97dffbbb5-dd72-47ba-8696-b7ca9f546171}', $feature.workerid) >-1, 'Sarah', '')
0 Kudos
RhettZufelt
MVP Notable Contributor

there does not appear to be curly brackets in the field for workerid.

All of these work for me:

 

if ($feature.workerid == "97dfbbb5-dd72-47ba-8696-b7ca9f546171"){
return "Sarah"}

 

or, can be handled with Decode.  Might be easier depending on how many workers you have:

 

Decode($feature.workerid, "e4e30100-aaf1-4567-bc6f-2393b779e367", "Sarah",
       "esf30100-aaf1-4567-bc6f-239sfd45874", "George", $feature.workerid)

 

or using When:

 

When($feature.workerid == "e4e30100-aaf1-4567-bc6f-2393b779e367","Sarah",
      $feature.workerid == "e4e30100-aaf1-4567-bc6f-2393b779e367","George", "Other") 

 

R_