Populate select_one question with a value from asset

3128
6
Jump to solution
07-27-2017 03:43 AM
SMauri
by
Occasional Contributor III

I'm trying to implement an form for verify an asset. In this survey I have activate "inbox" option and set a query filter. I'm using last version of Connect 2.3.24.

When I open an item to inspect I find almost all values pre-loaded in every relative question as you expected. But not for "select_one" question (with autocomplete appearance), as you can see in image.

However as you insert some character in the text box, it's possible to see that the value is just set correctly (back point near a choice based on value present in field "Ubicazione") but is not visibile as when you select it by manually.

Maybe a little bug?

Thank you

Stefano

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi Stefano,

Thanks for sharing your xlsx form. There are two parts to your issue I have discovered.

Firstly, select_one questions are treated as text type by default in the app. Even when the choice list is made up of only integers or decimals, the select_one question in the survey will still treat these choices as text. Setting the bind::esri:fieldType which you have done is related to the Feature Service attribute creation not to the survey field type, therefore you also need to insert a new column and set the bind::fieldType for that question and set the value as "Interger". This will allow the display of existing choices in the select_one box when opening a survey from the Inbox.

Secondly, it appears there is a bug with applying the autocomplete appearance to a select_one question and opening existing feature via Inbox for editing. As you noted, the selection will not be displayed in the box, but is still selected in the drop down list radio button. I have added this bug to the backlog to be reviewed and added to a future release.

In the mean time you will need to use the minimal appearance on the select_one question if you want to see the value for that attribute from the feature already populated in the box as text. I have attached an updated xlsx form which I was able to get working as described without using autocomplete.

View solution in original post

0 Kudos
6 Replies
by Anonymous User
Not applicable

Hi Stefano,

Do you have a default set on the select_one question that also has autocomplete appearance? And the default is not loading?

Could you please upload a copy of your survey xlsx form so I can take a closer look at it.

Regards,

Phil.

0 Kudos
SMauri
by
Occasional Contributor III

Hi Philip, I don't have a default set to any of my question,because my survey is based on a feature service hosted on my portal. So the default value is prepopulated when I open my asset through "inbox" section in Survey123.

My survey as attachment...

Thank you for your attention

Stefano

0 Kudos
by Anonymous User
Not applicable

Hi Stefano,

Thanks for sharing your xlsx form. There are two parts to your issue I have discovered.

Firstly, select_one questions are treated as text type by default in the app. Even when the choice list is made up of only integers or decimals, the select_one question in the survey will still treat these choices as text. Setting the bind::esri:fieldType which you have done is related to the Feature Service attribute creation not to the survey field type, therefore you also need to insert a new column and set the bind::fieldType for that question and set the value as "Interger". This will allow the display of existing choices in the select_one box when opening a survey from the Inbox.

Secondly, it appears there is a bug with applying the autocomplete appearance to a select_one question and opening existing feature via Inbox for editing. As you noted, the selection will not be displayed in the box, but is still selected in the drop down list radio button. I have added this bug to the backlog to be reviewed and added to a future release.

In the mean time you will need to use the minimal appearance on the select_one question if you want to see the value for that attribute from the feature already populated in the box as text. I have attached an updated xlsx form which I was able to get working as described without using autocomplete.

0 Kudos
SMauri
by
Occasional Contributor III

Hi Philip, this works great!

Thank you so much for your support.

Have a nice day

Stefano

SMauri
by
Occasional Contributor III

Philip Wilson wrote:


Secondly, it appears there is a bug with applying the autocomplete appearance to a select_one question and opening existing feature via Inbox for editing. As you noted, the selection will not be displayed in the box, but is still selected in the drop down list radio button. I have added this bug to the backlog to be reviewed and added to a future release.

Hi Philip, any update on this bug?

It's also present in Survey123 2.6.4 and it's very annoying...

Regards,

Stefano

0 Kudos
GlenColgate1
Occasional Contributor

We think we have run into this bug as well. We are trying to populate a default on a select_one with autocomplete appearance. The field (and dropdown) looks empty and it is unclear if the value is being set.

We have gone ahead with the minimal appearance until the issue can be resolved.

Thanks.