Select to view content in your preferred language

Arcade IIF statements and using 'OR'

791
2
Jump to solution
09-20-2022 08:25 AM
Labels (3)
collegekid_96
Emerging Contributor

Hi everyone,

I have the following arcade IIF statement:

var redcolor = IIf($datapoint.STATUS == 'SCHEDULING','#ff0000','#228B22')

Im using this statement for the Advanced Formatting  section for my List.

Im trying to come up with a scenario where can have something like this : 

var redcolor = IIf($datapoint.STATUS == 'SCHEDULING' OR $datapoint.STATUS CONTAINS TEXT 'SCHEDULED' ,'#ff0000','#228B22')

Where I can implement an OR expression and also some sort of CONTAINS function to find records with those characters. I have yet to see any documentation for Arcade.

 

Thanks,

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

For the "OR" expression, use the Logical Or operator "||". Use the Find function to will check if a string of characters within a text value.

var redcolor = IIf($datapoint.STATUS == 'SCHEDULING' || Find($datapoint.STATUS, 'SCHEDULED') > -1 ,'#ff0000','#228B22')

View solution in original post

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

For the "OR" expression, use the Logical Or operator "||". Use the Find function to will check if a string of characters within a text value.

var redcolor = IIf($datapoint.STATUS == 'SCHEDULING' || Find($datapoint.STATUS, 'SCHEDULED') > -1 ,'#ff0000','#228B22')
0 Kudos
collegekid_96
Emerging Contributor

Thank you so much!

0 Kudos