How to generate dynamic labels based on a calculation

If you’re doing a single language form then you could always add an extra column in your choice list - e.g. call it Country, and put the country code against each City in the choice list.

Can then use instance() to pull the data by specifying XML path - just like you would use pulldata() from an external file but in this case the data is coming from within the same XLSForm file (an additional column in the choice tab).

@NoelCartONG gave me this handy example the other day, which might help: example pulling data from additional choice list columns.xlsx (28.7 KB)

1 Like