Refer to a Specific Column in a Choices Field

“I have a choices field, but on my finished form I want to show a different column, and not the one that’s actually stored.”  

Here’s how to do that…

Data Sources can have as many columns as you like, and you may want to refer to the values in these columns when creating a Form.

To do so you will need to use a formula to refer to the desired column.

By default the first column in a Data Source (also known as the Value column) is always used as a field’s answer.  The second column (also known as the Label column) is always used to display the options to the mobile user.

For example, let’s say you have a “Customer” dropdown list in your form, called CustCode.  If the first column in your data source is “Customer Code” and the second column is “Customer Name”, then you will see the Customer Name in your dropdown list on the mobile device.  But FormsFly will actually store the Customer Code.   And, when you view your form results, the Customer Code will therefore be shown.

So, what if you actually want to see the Customer Name?  Or maybe one of the other columns in your data source, such as the Customer Address?

That’s no problem.

If you want to refer to any other column’s value, you just need to use some square brackets and the column’s index number.  In our example…

{{CustCode[0]}} is the first column in the dropdown.
{{CustCode[1]}} is the second column in the dropdown.
{{CustCode[2]}} is the third column in the dropdown.

…and so on.  Note that we start at zero with column numbers.

If you have a Word template for your form, you could decide where you want the customer name to appear and just type…


…in that location.  If you wanted the Customer Telephone number, and that was in the fourth column of your data source, then you would use…


Hope it helps!