Select to view content in your preferred language

Rank + jr:choice-name + web app: return 'undefined'

188
3
09-10-2024 06:23 AM
SMH-Rio
Frequent Contributor

I'm trying to use the jr:choice-name function in a rank question in a form in the Web App, but the result is always 'undefined'. The goal is to return the label of the first 3 choices, concatenated by commas.

concat(jr:choice-name(selected-at(${teste_rank}, 0),'${teste_rank}'), ', ', jr:choice-name(selected-at(${teste_rank}, 1),'${teste_rank}'), ', ', jr:choice-name(selected-at(${teste_rank}, 2),'${teste_rank}'))

In Connect (v. 3.20.63), I see that it works. And, when using the same formula for a select multiple question, it works fine (in Connect/Field App and in the Web App).

Is this a bug in the Web App + rank + jr:choice-name combination or am I doing something wrong?

Thanks in advance.

 

SMHRio_0-1725974340075.png

 

SMHRio_1-1725974444083.png

 

 

0 Kudos
3 Replies
abureaux
MVP Frequent Contributor

Confirming that this does work:

abureaux_0-1725976120567.png

abureaux_1-1725976133630.png

Maybe a limitation of the web form?

EDIT: ya, this is a web limitation.

0 Kudos
SMH-Rio
Frequent Contributor

I believe so, but it is related to the Connect version. I have already used the same scheme in other public consultation forms, on the Web, and I did not have this problem. I just do not know in which version this started.

0 Kudos
abureaux
MVP Frequent Contributor

If you know this was working in the past, but stopped due to a Connect update, I would highly recommend you open an Esri Support case and get this logged as a bug (also, post the bug # here so others can add to their profile if they run into the same issue).