Greetings. In my survey i have a select_one question where the answers are populated via 'autocomplete search()' functionality. The 'name' value, that is the 'id' of the selected answer, is being stored in the survey's feature class as the actual answer to the question. The 'label' value of the selected answer is stored in the Survey as a calculated field but its esri:fieldType is 'null' so i think it's value is not kept when the survey is submitted.
Is there a way to get that 'label' value for display in the survey Report template. The 'id' value won't mean anything to Report readers; only the 'label' will.
Thank you
Hey @Neal_t_k Thanks for your super fast response.
Agreed that just storing the label value is the easiest for reporting. The reason it's not my preferred approach is that currently i am storing the 'id' value which can never change whereas the 'label' value can and does change. The data is the 'location' where the work was done - its id value wont/cant change based on company 'business rules'. However the name of the site can change. It doesn't happen often, but it does happen. In those cases, i'd have to go back thru all the previously submitted records and change the location label value. So, it's a classic data maintenance and QA/QC reason for not storing the 'label'
In that case you might be able to employ some conditional statements in the report to accomplish what you want, but that may cause similar headaches to the ones you mention above depending on the size of your list in that you would still have to update the template when labels change.
https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereport-conditionalelements.htm
Thanks for the link. I've been looking for something like that.
There are a couple hundred sites so that may not be an efficient approach for this problem. I'm looking at other programmatic python based pdf report generators now. The Survey123 Report generator just may not be the right tool for this situation.
If you are doing python and stored your label, you could just set a script to periodically iterate trough your id column and update your label column based on your master list.
@Trippetoe Is your id field in your feature layer have a coded domain? I wonder if jr:choice-name() would work, it couldn't hurt to try? Then you would just have to update the label for the domain in your feature layer
or maybe if you just setup a domain for that field, this appears to say it pulls in the label instead of the name unless specified.
https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereport-choice.htm
Hi @Neal_t_k
I've wandered pretty far down the 'roll-my-own-report-with-python' path. It's probably too far to back out of that path now 😉 Thanks again for all your help.