Hi, I’m currently trying to use select_one_integer in my survey, but it doesn’t seem to be working. I have something like this in choices:
data_value display.title.text
1 1
2 2
3 3
4 4
I get notified by app-designer: error in the template. Am I approaching these choices wrong?

Thank you for the help!

Hi @Todd_Meng! As you are new to the community, when you get a chance, please introduce yourself here.

I’d also encourage you to add a real picture as your avatar because it helps build community!

In terms of your question, if you can share your form, that would be very helpful. Does the error message refer to a particular row or are there other things you changed that might be causing the problem? As well as the data_value and display.title.text you do need a choice_list_name as well.

formDef.json (21.1 KB)
In the app-designer preview, it notifies me of the error when I go to that question on the form.
MyApp.xlsx (11.1 KB)

Again, thanks for the help.

@Todd_Meng one guess looking at your choices list in excel is that your display.title.text is not actually text, it’s a number. The select_one_integer is meant to let you choose a text response that records an integer as the value. For example:

choice_list_name data_value display.title.text
food_security_list 1 Always had enough
food_security_list 2 Always had enough, but sometimes food was of low quality
food_security_list 3 Didn’t have enough a few times a year
food_security_list 4 Didn’t have enough a few times a month
food_security_list 5 Didn’t have enough a few times a week
food_security_list 6 Never or almost never had enough

If you just want an integer to be the response (not text), just use the integer prompt type to start with. You can constrain it to be between 1 and 5 with the constraint column. Or you can put the text in quotes, e.g. in display.title.text =“1” instead of 1

Just a guess but try it and see if that resolves it.

I looked more into it and I think it is an excel thing - adding a single quote ’ before the number converts it into text in excel apparently. So I fixed it doing this in the display.title.text column
which fixes the issue.
Thanks for your help!

1 Like