This one might be a bit of a stretch, but in a survey I am using the search() appearance to query a layer of assets to create a choice list of Asset IDs, right now I have the UNITID field as both the name and label.
I have been asked if I could include the description (UNITDESC) in the label as well to help users more easily identify them.
I've considered using Python to create an expression field on the layers in question, but as the nightly publishing process we use to post the layers to ArcGIS Online I assume this would blow away that expression each time?
My question is, to avoid creating an unnecessary extra field, is there a way to concatenate two fields into a single label in the search() appearance?
If I understand correctly, you are wanting the resulting drop-down which currently displays a series of UNITID to instead be something like UNITID (UNITDESC)? I don't think that is possible. You would need to merge the two items in the database, and use that new column as the display for the drop-down.
While a little different, we had to do something similar for a WAB app.
Yes that's exactly what I'd like to do.
I was thinking it's likely not possible but I wanted to put the question out there in case it was (or to make it an idea for a future improvement if others felt it's useful). We've decided for the time being that merging the two items into another field in the layer itself isn't something we really want to do.