Perspective Component Value Quality in button Script

Hello,

I want to have a button update a table but before doing that I want to verify the quality of a drop down component first. How can I use an if statement to check the components value quality? The value isn’t set to a tag or anything.

Within a script is actually fairly difficult. What I would recommend is that you bind a property somewhere against the quality of the value in the Dropdown, and then reference this custom property in your script.

So create a custom property on the Dropdown (Dropdown.custom.value_qual).
Bind that in one of these two ways:

Expression Binding is the easiest way.
Screen Shot 2020-07-08 at 10.56.58 AM

Alternatively, you could bind against the property and check against quality instead of value:
Screen Shot 2020-07-08 at 10.58.51 AM

Then in your script, just address the custom property:

if self.getSibling('Dropdown').custom.value_qual:
    # Do something

Perfect. I tried binding a custom property but wasn’t aware of the “isGood” clause. Thanks.

1 Like