Report Temaple experession to return select_one name instead of label?

148
4
Jump to solution
07-12-2018 04:15 PM
Occasional Contributor

I want to pull the name value from my select_one list into the Report Template instead of the label:

The label looks great in the Survey123 app:

But I need the actual DB value (i.e. '9') in the Report Template instead of the verbose label ('<b>9</b> - Very Good, New Condition')

Alternatively is there an expression that will pull a specific character into the Word Doc report instead of the full label?

Reply
0 Kudos
1 Solution

Accepted Solutions
Esri Regular Contributor

Hi Adam,

Yes, you can use ${fieldname1 | getValue:""} to get the raw value of an underlying field. For a string field with coded value domain, it will return the code, for a date field, it will return the Unix time.

For example, ${expertise} returns "None. I have never used it." (the name of the coded value domain) while ${expertise | getValue:""} returns "none" (the code of the coded value domain).

View solution in original post

4 Replies
Esri Frequent Contributor

Zhifang Wang‌ Can you please look into this and update user if it is currently possible? Otherwise can we create as possible enhancement request to use a parameter?

Reply
0 Kudos
Esri Regular Contributor

Hi Adam,

Yes, you can use ${fieldname1 | getValue:""} to get the raw value of an underlying field. For a string field with coded value domain, it will return the code, for a date field, it will return the Unix time.

For example, ${expertise} returns "None. I have never used it." (the name of the coded value domain) while ${expertise | getValue:""} returns "none" (the code of the coded value domain).

View solution in original post

Occasional Contributor

Worked like a charm, thanks.  Where is the best place to find a listing of these functions?

Esri Frequent Contributor

Hi Adam,

You can find the supported expressions in the Survey123 Online Documentation: Print survey results—Survey123 for ArcGIS | ArcGIS 

Phil.

Reply
0 Kudos