# Perspective Component Value Quality in button Script

**URL:** <https://forum.inductiveautomation.com/t/perspective-component-value-quality-in-button-script/36504>\
**Category:** Ignition\
**Created:** [July 8, 2020, 5:28pm UTC](https://forum.inductiveautomation.com/t/perspective-component-value-quality-in-button-script/36504 "2020-07-08T17:28:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle.lawson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kyle.lawson](https://forum.inductiveautomation.com/u/kyle.lawson)\
**Post date:** [July 8, 2020, 5:28pm UTC](https://forum.inductiveautomation.com/t/perspective-component-value-quality-in-button-script/36504/1 "2020-07-08T17:28:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [July 8, 2020, 6:03pm UTC](https://forum.inductiveautomation.com/t/perspective-component-value-quality-in-button-script/36504/2 "2020-07-08T18:03:28Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac3c164baf72cb2d43337e12576748b9e2ffe1cf.png)

Alternatively, you could bind against the property and check against quality instead of value:  
 ![Screen Shot 2020-07-08 at 10.58.51 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/5/1591da5d3bbd79ab68966b1a7716a76bf94b7871.png)

Then in your script, just address the custom property:

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

```

---

<div class="post-metadata">

**Author:** ![kyle.lawson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kyle.lawson](https://forum.inductiveautomation.com/u/kyle.lawson)\
**Post date:** [July 8, 2020, 7:03pm UTC](https://forum.inductiveautomation.com/t/perspective-component-value-quality-in-button-script/36504/3 "2020-07-08T19:03:55Z")

</div>

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