ListBox Label Expression
The Inline Help for the ListBox Form Element states:
The name of the feature field used to populate the items' labels, or a format string used to populate the items' labels. This can contain field names surrounded in curly braces.
What is the proper syntax for this expression?
When I try to enclose the field names I want to use in a string expression in curly braces, it says the syntax is incorrect. I have two fields - NOTIFICATION_NAME and NOTICE_GROUP that I'd like to display for the label as "[Notification Name] for [Notification Group]"
What's the syntax to get that label for a ListBox item?
-
My guess would be:
="[{NOTIFICATION_NAME}] for [{NOTICE_GROUP}]"But what have you tried so far?
0 -
Bedankt, Berend! That worked. I had tried various combinations of string formats and template literals that had the “field names surrounded by curly braces”, but I didn’t realize I needed the “field names surrounded by curly braces” surrounded by square brackets. Where did you get that format? Is it a standard usage? 0 -
Graag gedaan :-)
It is definitely not standard usage, I just thought you wanted to have literal square brackets in the label, because that's what was in your question.
Are you saying that with square brackets it works, and those brackets don't show up in the label text?
As far as I can tell, this should work too. If not, it would IMO be a bug, or an omission from the documentation:
="{NOTIFICATION_NAME} for {NOTICE_GROUP}"0 -
HA! I didn’t even notice the square brackets in the output. So, no, they aren’t needed. I don’t know what I was doing to make it not work – probably not using the “=” sign at the beginning of the expression (a favorite pastime of mine)* – but copying your example got things back on track. Thanks, again. *don’t call a doctor. i’ll be fine. are these my feet? 0
Please sign in to leave a comment.
Comments
5 comments