Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
romain_p
Contributor II
Contributor II

Knowing if a selection content a certain value

Hello guys,

I am trying change the color of a Text_Object depending of the selection of a Field.

The field name is [Quarter], and the Text_Object might turn Orange() when the value 'Q3 19' is selected.

It works when I select only 'Q3 19'  in the field, but not if I select several values ('Q3 19' & 'Q4 19' for example).

 

The script is like that for the moment:

 

if([Quarter]='Q3 19',RGB(240,171,0),RGB(217,217,217))

Do you have any solution?

 

Thanks a lot in advance!

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try something like this.

=if( SubStringCount('|' & Concat([Quarter], '|') &'|', '|Q3 19|') ,
     RGB(240,171,0),
     RGB(217,217,217)
    )

View solution in original post

2 Replies
Vegar
MVP
MVP

Try something like this.

=if( SubStringCount('|' & Concat([Quarter], '|') &'|', '|Q3 19|') ,
     RGB(240,171,0),
     RGB(217,217,217)
    )

romain_p
Contributor II
Contributor II
Author

It works!

 

Thanks a lot Vegar!