Change Pin Color on Map based on Status

I am attempting to change the color of the location pins on a map, based on the Status column of a table.  I am not a programmer, just so you know.  I have attempted an IFS() statement and a SWITCH() statement.  I am able to run a test after entering the statement.  The test results in correct return of data.  However, when I save the Format expression AppSheets errors out.  I have had a couple of error messages.  One saying the expression cannot except seven arguments.  Another error says the statement must return a true statement.  I am including a copy of my SWITCH statement for your review.  Should I be using a different expression?  Or is my expression in need of professional help?

Switch Statement.jpg

โ€ƒ

Switch Test.jpg

โ€ƒ

Switch Error Msg.jpg

โ€ƒ

Solved Solved
0 2 125
1 ACCEPTED SOLUTION

You cannot use the expression as you have it in a single format rule.  A Format Rule's condition only results in a Yes/No answer to determine if the rule is applied or not.

You need multiple Format Rules, one for each Status/Color combination.  So you would place in the condition [Status] = "XYZ" to decide which rule is applied and then set the formatting (color, icon, etc) for when that rule is applied.

I hope this helps!

View solution in original post

2 REPLIES 2

You cannot use the expression as you have it in a single format rule.  A Format Rule's condition only results in a Yes/No answer to determine if the rule is applied or not.

You need multiple Format Rules, one for each Status/Color combination.  So you would place in the condition [Status] = "XYZ" to decide which rule is applied and then set the formatting (color, icon, etc) for when that rule is applied.

I hope this helps!

Thanks,  I will give that a try.