Survey123 Report prints the Name of a response rather than the Label

1160
9
11-15-2018 11:46 AM
JAVIERVARA_SANZ
Occasional Contributor II

I'm publishing surveys edited in a previous version with version 3.1.126, and noticed the report prints the Name of a response rather than the Label.

Any suggestions?

Thanks.

Javier

Tags (2)
0 Kudos
9 Replies
JohnathanHasthorpe
Esri Regular Contributor

Please share a little more information. What question type is this affecting and can you share the survey xls and report template?

Thanks

John

0 Kudos
JAVIERVARA_SANZ
Occasional Contributor II

Good morning John.

Thanks for getting back with me.

The issue is occurring with select one questions. For example, my choices for fuel type in one of my questions are as follows:

fireType

Backing

B - Backing Fire

fireType

Head

H - Head Fire

fireType

Flanking

F - Flanking Fire

In my scenario, selecting ‘B - Backing Fire’ from the dropdown will populate ‘B – Backing Fire’ in the feature service and also display ‘B – Backing Fire’ in the resulting custom report.

Although I am using Survey Connect 3.1.126, my xlsx file is based on copy of a version that does not include the addition of the predictivetext and nonpredictivetext appearances, but I am not using them. Not sure if this matters upon publishing, so just letting you know

Let me know if you need any additional information.

Thanks.

Javier

0 Kudos
JAVIERVARA_SANZ
Occasional Contributor II

Just for clarification John.

In my Survey, the field name is FbFireType, and it is being referenced in my report template as $. I am using ${FieldName|selected:’Choice’} ChoiceLabel in other questions, but not on any of the questions where I am having this issue.

Thanks again.

0 Kudos
JAVIERVARA_SANZ
Occasional Contributor II

Good morning John.

I've created a very simple form with a select_one question.

Find attached the form and the template.

I would say this is a bug, so looking forward to hear from you in this regard.

Thanks.

Javier

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Hi Javier

I tested the simple sample you created and the result was that the label was being printed:

B - Backing Fire

The syntax you used in the template was correct: 

${FireType}

Can you confirm that you are still seeing the issue with your sample?

Thanks

John

0 Kudos
JAVIERVARA_SANZ
Occasional Contributor II

Good morning Johnathan.

Please accept my apologies for all the confusion. I've just realized the thread name is reversed. 

The actual issue is that I need to print the name rather than the label. My understanding is that label is used for display only (description in the corresponding service domain), and that the value for the corresponding field will be populated with the name value in my choice list (coded value in the service domain). 

In other words, 'B - Backing Fire;, should have actually populate my field with 'Backing Fire' everywhere else after the record is submitted.

FYI, I've checked the domain properties in the service and everything looks correct there.

Fire Type Domain

This is actually not happening, which is the reason why I reported it as a potential bug. 

Thanks agian.

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Hi Javier

To print the name, the syntax is as follows: ${question | getValue:""}

For example, in your case

${FireType}
${FireType | getValue:""}

Will print:

H - Head Fire
Head

Cheers

John

0 Kudos
JAVIERVARA_SANZ
Occasional Contributor II

Thanks a million Jonathan.

Would this be the way to retrieve select one questions coded values from now own?

I truly appreciate your help.

Javier

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Yes - we will document this for the 3.2 release.

0 Kudos