I was able to create a When() statement in Arcade for the ArcGIS Online pop-up of a Work Order hosted feature class that displays the workers' names without the underscore in the name and puts each new name on a separate line. I am trying to recreate this in Dashboard, since Arcade cannot be done in Experience Builder Lists. However, the syntax is different when doing the code for pop-ups versus in the Dashboard List. Can someone please help me determine how to do it, if possible? The current setup looks something like this:
var worker = $feature["WORKERS_ASSIGNED"]
When(
worker == 'Worker_One',"Worker One",
worker == 'Worker_Two',"Worker Two",
worker == 'Worker_Three',"Worker Three",
"Unknown")
Depending on which worker(s) are chosen, the names show up in the pop-up as:
Worker One
Worker Two
Worker Three
My reasoning for doing this is so the names look nicely formatted in the app List (whether in Dashboard or Experience Builder), instead of having a list like Worker_One,Worker_Two,Worker_Three. I currently have a field for each worker name (~25) that formats the name in Survey123 Connect, but I'd love to be able to get rid of those extra fields. This is the only way I've found that might allow me to do this. Any advice is welcome!