Choice component with combination of numbers and text

I’m trying to create a drop down component where several choices are numbers, but I need the last choice to be “other.” So I can’t put my choices in a number column. But I need the other choices to be numbers, not text, because I’m using them in a formula.

Ideally, I’d like “other” to be entered as a zero to make my formulas work, but I have no idea how to accomplish that.

Anybody have a thought?

  • Create a column to store your “front-end” choices. This would be 1, 2, 3, 4, Other.
  • Create a column to store your “back-end” choices. This would be an if-then-else column. If front-end choice is “Other”, then 0, else just return the same front-end choice.
  • In your choice component, point “Values” field to back-end choices, “Dispaly as” field to front-end choices.
2 Likes

@ThinhDinh Your suggestion makes perfect sense, and I think I set it up exactly like you said.

When I choose any of the numerical options, it works perfectly. But when I choose “Other” it doesn’t write the zero for some reason I can’t figure out. I’ve tried drop downs and radio buttons as well… Same result. For some reason it’s not picking up the zero.

Any idea what I’m doing wrong?

If you create a normal numeric column and manually fill in the numbers, does that new column work better than the IF column with your choice component?

It does. But I need the option of “Other” as one of my choices, which is the purpose of the IF column.

Right, but what I’m saying is to replace the IF column with a basic column. You would still use the Display column for the ‘Display As’ parameter, but change the Value parameter to use the new column instead of the IF column. Just trying to determine if the IF column is the issue or not.

1 Like

I get it. I made a test numeric column and pointed the value parameter to it and it works just fine. So it appears that the IF column is the issue, and I’m trying to figure out a workaround so I can still include OTHER as one of my choices and when someone chooses OTHER the value becomes zero.

I suspect the problem is the IF column isn’t numeric?

This should be the case if you are setting the ‘Display As’ parameter.
in the choice component. If not, it would help to see a screenshot of you choice component configuration.

Possibly, even though I’m really surprised that it wouldn’t work.. Actually the problem may be because the ‘Bike Value’ column is not numeric, which means the IF column not numeric. But usually, stuff like it’s pretty flexible as far as working with different data types. I guess you could use the IF column, then follow it with a math column to get the value to become numeric.

Okay, now I understand what I don’t understand. I’m dealing with three sets of data.

  1. The location the response gets recorded.
  2. The display data, which includes OTHER.
  3. The numeric data, which has the zero in place of OTHER.

In configuring my choice component, I have defined #1 and #2. I don’t know how to account for #3.

From what I can see, there are only two inputs for the choice component. How do I account for #3?

@Jeff_Hager I just answered my own question. I didn’t realize DISPLAY AS was the third input. I might have it figured out.

Yes, the ‘Display As’ is what is displayed as your choices. The ‘Value’ is the value that is written to the column defined as ‘Written To’

Since you weren’t actually seeing the ‘Display As’ parameter, I think you can go back to @ThinhDinh’s solution to use the IF column as it should work.

1 Like

Thanks to both of you. I think I have a working for now until I make another mistake and come back begging for help.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.