0

I have a layer with a "Completed" field with 4 unique values. - design phase - future year - under construction - completed

in my pop-up configs I have "Status: {Completed}"

How can I use Arcade to change the color of the status value text based on its value?

eg. completed = green under construction = orange, design phase black future years light grey

2

The Answer was to create a specific Arcade Expression per "Value" that I wanted and identify each expression in the pop-up config with a different color text.

Expression 0: IIf($feature.status=='completed', 'completed', '')

Expression 1: IIf($feature.status=='under construction’, 'under construction', '') Expression 2: IIf($feature.status=='in design', 'in design', '')

Add each expression in pop-up

Status: {expression/expr0}{expression/expr1}{expression/exp2}

assign each of those expression a unique color within the pop-up config manager

0

One slight difference I used was in passing the field value back into the expression, rather than defining it as 'string':

IIf($feature.status=='under construction’, $feature.status, '')
IIf($feature.status=='completed’, $feature.status, '')
IIf($feature.status=='in design’, $feature.status, '')

This works really well for non-string values as well, ex. $feature.speed>50, $feature.speed<60.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.