Survey123 instance_name to show from select_one value?

739
7
Jump to solution
02-16-2020 07:34 PM
Pauline_Low_Pui_Ling
New Contributor II

Hi there,

Would like to know if there is a way/work around to show the instance_name from a select_one value?

survey tab

settings tab

 

As seen from the mobile app, I could not see the values for estate_id and estate_name. 

Hope someone can help me understand and let me know the workaround so that the instance_name will capture the estate_id and estate_name? 

Thanks,

Pauline

0 Kudos
1 Solution

Accepted Solutions
Alber_Verster
Esri Contributor

Hi Pauline,

I managed to get the 2 values to concatenate and they are now showing fine.

I noted that you had a space in your concat function on the settings tab, removing this seems to have solved the issue. Also recieved an error about missing labels for the 2 estate name fields, which I added.

Hope this helps!

Albert

View solution in original post

7 Replies
Jim-Moore
Esri Regular Contributor

Hi Pauline

From your screenshots I can't see a reason why the instance_name is blank. Could you please provide your XLS and CSV files so I can attempt to troubleshoot?

Is the pulldata() function working correctly in the survey form?

Thank you,

Jim

Pauline_Low_Pui_Ling
New Contributor II

Hi Jim,

I can see the estate_id now but not the estate_name.. suspect it could be due to the select_one type. Anyhow, here are the files:

estate_list.csv

survey.xls

Thanks,

Pauline

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Pauline

Thanks for the files. The link you've provided for 'estate_list.csv' opens an XLSX file. Just to confirm, is the estate_list.csv in your survey's media folder a CSV file? If you open it in a text editor it should look like this:

Using a CSV file as per above, I get the correct instance name in Outbox, Sent, etc.


Also I notice the labels for your 'estate' choice list are the same as the estate names in the CSV. In this case, instead of using pulldata() you could use the jr:choice-name() function to return the label for the choice. So the calculation would look something like: jr:choice-name(${estate_id}, '${estate_id}')

This function is documented here Formulas—Survey123 for ArcGIS | Documentation and here Cascading and external selects—Survey123 for ArcGIS | Documentation.

Best,

Jim

Pauline_Low_Pui_Ling
New Contributor II

Hi Jim,

You are right. I need to save it as a csv file. Thanks for the guide. Will look into it possibly using jr:choice-name(). 

Regards,

Pauline

Alber_Verster
Esri Contributor

Hi Pauline,

I managed to get the 2 values to concatenate and they are now showing fine.

I noted that you had a space in your concat function on the settings tab, removing this seems to have solved the issue. Also recieved an error about missing labels for the 2 estate name fields, which I added.

Hope this helps!

Albert

Pauline_Low_Pui_Ling
New Contributor II

Hi Albert,

Yup deleting the space in between the concat and '(' helps! Thanks for helping out. 

Regards,

Pauline

0 Kudos
Alber_Verster
Esri Contributor

Hi Pauline,

Glad that helped. Could you please mark the comments as helpful?

Thanks again.

0 Kudos