HOW TO

Change the text color display in ArcGIS Survey123 Connect

Last Published: April 26, 2024

Summary

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.

An example of the ArcGIS Survey123 Connect survey form

Procedure

  1. Open the ArcGIS Survey123 Connect XLSForm.
  2. Create the survey question. In this example, the note question type is created.
    1. In the survey worksheet, under the type column, select note.
    2. Specify the name for the question that is not listed in the Reserved worksheet and the text to be displayed under the label column. In this example, the question is named 'note2' and labeled 'Identification'.
    3. Under the calculation field, specify the following formula.
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>', '')))
The XLSForm with one note question type created and the specified calculation formula
 

Article ID: 000028627

Software:
  • ArcGIS Survey123 Connect

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options