HOW TO
In ArcGIS Survey123 Connect, formulas can be applied to questions to set certain conditional formatting to the survey display text. It is possible to customize the text color based on the value calculated from a nested if statement.
This article provides the steps to define the formula that defines the text color displayed based on the total number of fruits purchased in the past two weeks as an example. The image below displays an ArcGIS Survey123 Connect survey form with the populated colored text answer for the Identification question.
if(${<questionName1>}<operator1><fieldValue1>, '<font color="<colorName1>"><displayText1></font>', if(${<questionName1>}<operator2><fieldValue2> and ${<questionName1>}<operator3><fieldValue3>, '<font color="<colorName2>"><displayText2></font>', ''))
The code block below is an example of the full working formula with three conditions to be applied to the 'note2' question.
if(${note1}>9, '<font color="green">A lot</font>', if(${note1}<=9 and ${note1}>=5, '<font color="blue">Enough</font>', if(${note1}<5 and ${note1}>=0, '<font color="red">Limited</font>', '')))
Get help from ArcGIS experts
Download the Esri Support App