I have been looking around for an answer to this question but never really saw something that fit what I was looking for. But I have a survey with a select_multiple question where there are quite a few selections that a user can make. However, in the pop-ups for those features in a web map, the attributes are displayed as the name field rather than the label, and they all run together, not very appealing or user-friendly. See photo attached. This wouldn't be much of a problem if the labels didn't have spaces, which you obviously can't have spaces in the name field.
Is there a way to have the resulting selections show up as the label instead? Otherwise, the survey results have no meaning for my stakeholders and would make the survey userless.
Easiest way I can think of is an Arcade expression in your pop-up, something like:
var value = "7,6,1,7";
var lookup = {
"1": "Apple",
"2": "Banana",
"3": "Pear",
"4": "Orange",
"5": "Cherry",
"6": "Pineapple",
"7": "Pen"
};
var items = Split(value, ",")
var retval = ""
for (var i in items) {
retval += lookup[items[i]] + ", "
}
return Left(retval, Count(retval) - 2)
Replace that "value" variable with whatever you need to do to get the field. This will involve maintaining the name to label lookup in both the form and the Arcade script.