Select to view content in your preferred language

Survey123 Feature Report - Conditional Formatting based on answer

2845
4
Jump to solution
04-23-2020 04:53 AM
Jeff_VanEtten
Regular Contributor

Wondering if there is a way to create conditional formatting inside the feature report template based on a response.  For example, if inside the survey it was recorded options of Priority A, B & C and this wanted to be displayed with Red, Amber and Green text, is there a way to use conditional formatting to do this?  I know that it would be fairly easy to do in Excel, but not sure about how this would be done in Word Template (mail merge).


Thanks

Jeff Van Etten
Head of GIS
Tetra Tech Ltd
0 Kudos
1 Solution

Accepted Solutions
Jeff_VanEtten
Regular Contributor

Well finally figured out a work around to this using conditional elements with some code that looks like this in a table: 

${if invest_priority==”A”}Priority A ${/}${if invest_priority==”B”}Priority B ${/}

Not perfect, but its a workaround for the time being.

Jeff Van Etten
Head of GIS
Tetra Tech Ltd

View solution in original post

4 Replies
Jeff_VanEtten
Regular Contributor

Well finally figured out a work around to this using conditional elements with some code that looks like this in a table: 

${if invest_priority==”A”}Priority A ${/}${if invest_priority==”B”}Priority B ${/}

Not perfect, but its a workaround for the time being.

Jeff Van Etten
Head of GIS
Tetra Tech Ltd
TCKauhi
Occasional Contributor

This was very helpful, thank you. We have it working for when values (integers) are greater or less than one value (refer to example below), however do you know what would the syntax be for a range of values? For example, if we want a certain formatting when the value is between >46 and <=60? 

${if mobilize_mins <= 45} ${mobilize_mins} minutes ${/} ${if mobilize_mins >= 120} ${mobilize_mins} minutes ${/}

0 Kudos
TCKauhi
Occasional Contributor

It appears the solution is in this feed, thank you and disregard. Solved: Conditional (if / then / else) logic in Survey123 ... - Esri Community

0 Kudos
MathieuBoonen
Regular Contributor

I have found in order for this to work for me I have had to include quotation marks around the  conditioned format data if it has spaces in the response, or introduce a hidden character as in an unscrore colored white if you dont want the quotes marks to appear in the response on the report as per: showing both methods

${if invest_priority==”A”}Priority_A${/}${if invest_priority==”B”}"Priority B"${/}