Button - Style Customizer - Indirect Binding for Text

#1

In the image below, my current setup is:
Site ON
Site OFF
I want to basically use an expression in the text field area to indirectly bind to each site, where each site has 3 or more wells on it.
ie;
Sites: Site1, Site2, Site3
Well, per site: Well1, Well2, Well2

In the top button I want it to say, depending on which site:
Site1 ON - Site1 OFF
Site2 ON - Site2 OFF
In the bottom button depending on which well:
Well1 ON - Well1 OFF
Well2 ON - Well2 OFF

The color change works fine with the regular Style Customizer functions.

The indirection comes from custom properties on the root container where they are used elsewhere in expression bindings. The hangup is using this in the style customizer to bring the text in, held in a memory tag on each site and well.
This works to bring in the Site name, but I can not switch between on and off text with this expression binding alone.

image

image

Please and thanks!

0 Likes

#2

You won’t be able to use style customization and an expression binding at the same time.

Remove the text binding in the style customizer and fully use the expression binding. Example:

concat(tag({Root Container.UDT_Path_Over} + '/PadID'), 
	if({./state} = 1, ' ON', ' OFF')
	) 

Replace with whatever controls the state of the button style.

As a note, if you use ‘+’ to concatenate strings, you don’t need to use a concat function.

0 Likes

#3

Ah, thank you, I will give it a try.

0 Likes