Get Form Element Items From Features Label Expression Item Reference
I am working with the label of a Get Form Element Items From Features. I am wanting to perform a Math.round on a column for each feature but have not been able to figure out how to reference the feature .
e.g. I would like to essentially do this
="Value: " + Math.round(feature.attributes.My_Column_Name, 2)
Is this possible?
-
Hi Kevin,
Unfortunately we don't support that sort of logic as we just use a template string for each feature. A workaround would be to add an extra attribute to your feature set (such as "My_Rounded_Attribute") and use the For Each activity to round the value from "My_Column_Name" and assign the rounded value to "My_Rounded_Attribute". Then you could use that value in your label like this:
Value: {My_Rounded_Attribute}0 -
Darn, that's too bad.
That is more or less what I ended up doing. Seeing it was just query data for display I just rounded it off in the existing field using a for each.
0 -
Glad you were able to get it working, although not quite as you wanted.
I've seen other systems that have allowed some kind of format notation within the placeholder such as {My_Column_Name:D2} (for decimal with 2 decimal places). I could imagine something like that being a potential enhancement some day.
If you want you could post something in our ideas page and we could see how many others would like it too. We try to incorporate some of those requests from time to time.
0
Please sign in to leave a comment.
Comments
3 comments