Visible Binding - Using Expression type binding to search for key word in string

I have a drop down that is populated the following query.

SELECT '%' AS Value,"Select Container"
Select CONCAT_WS(' ', style, type) AS Value, CONCAT_WS(' ', style, type) AS Label
FROM container

Based on the operators selection of this dropdown I would like to Make Visible( or invisible) other objects on the screen. By looking for key words, in this case the word Can or Bottle.
If it was a query I would search for ‘%Can%’.
What is the best way to accomplish this goal?

This should work as your visibility expression (no match = -1):

indexOf({Dropdown.selectedValue}, "Can") > -1
1 Like

The Drop down Selection I made is 12oz Standard Can
The Visible Binding is

indexOf({Root Container. Dropdown.selectedValue}, "Can") > -1

Nothing became visible and no errors.

Yeah, selectedValue should be selectedLabel or selectedStringValue–I’m guessing the former (or looking closer at your query, I expect either one will give the same result).

1 Like

Perfect. Thank you.
Here is what appears to be working.

1 Like