Choice filters using a hidden calculation field?

822
3
12-22-2020 02:48 AM
Anneka_France
Occasional Contributor III

Is it possible to set up a choice filter using a hidden calculation field, rather than a select_one or select_many field?

For example, we have a hidden field (${organisation}) with the calculation:

if(${total_score}>=10, 'organisation1','organisation2')

I then want to apply a filter to a choice list based on the value of this field. I've followed the steps above, but it doesn't seem to work. Am I missing a step? Or is it because it's not the correct field type?

Anneka France
Technical Manager at The Rivers Trust
0 Kudos
3 Replies
Hussam_AlJabri
Occasional Contributor III

Hi, could you please share your XLSForm so I can support on this regards.

0 Kudos
Jing_Sun
Esri Contributor

Hi Anneka, I created a sample using default field type, please see the screenshots below.

Jing_Sun_0-1608779515266.pngJing_Sun_1-1608779551764.png

Cheers

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi. Yes, this is possible.

For example, here I calculate the Body Mass Index of a person and use that value to present menu items in a list. The Body Mass Index is hidden to the user.

IsmaelChivite_0-1609185984398.png

IsmaelChivite_1-1609186045506.png

The same goes with your original example, which should work well.

I am guessing that your version of Survey123 Connect is old. If you are running using the latest version, attach your XLSForm to a reply.  There might be something else we could not see in your screenshot.