# Change Custom Property values depending on switches

**URL:** <https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 20, 2022, 9:07am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823 "2022-05-20T09:07:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugobre](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@hugobre](https://forum.inductiveautomation.com/u/hugobre)\
**Post date:** [May 20, 2022, 9:07am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/1 "2022-05-20T09:07:20Z")

</div>

Hey !

I have those 3 customs property right here.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/a/6aaf84506ba1ed61d5a2c2e4fe168018bafff9ad.png)

I want them to change their values depending on the state of the switches bellow.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/c/fcd485146ba30e05680210e44b792ff03040450f.png)

I guess that I have to script somewhere but I don’t know where.

Thanks !

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 20, 2022, 9:21am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/2 "2022-05-20T09:21:24Z")

</div>

What are the switches linked to ? Other custom properties ?  
What behavior do you want to obtain ?

Seems to me that simple expression bindings would do the trick, but we need to know more about what you want to do.

---

<div class="post-metadata">

**Author:** ![hugobre](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@hugobre](https://forum.inductiveautomation.com/u/hugobre)\
**Post date:** [May 20, 2022, 9:30am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/3 "2022-05-20T09:30:59Z")

</div>

I get the status of my switches in other custom properties.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db699b7f6d7b769678f1441e8313b688936065e8.png)

I want for example that if the switch “Geneve” and “Eclairage” are true then the custom property  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/45c6af70e8f9b002f13a9b4482c4f3c182a8432b.png)  
has a value of the addition of others properties that are linked to tags.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c4457c286694f5ef13d87498dac105290d7de0d7.png)

If you didn’t understand tell me.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 20, 2022, 9:46am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/4 "2022-05-20T09:46:48Z")

</div>

![Totaliser](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3ecbf083e9bf585d738a98ff45724c96c320d395.gif)

Create an expression binding on PuissanceActiveTotale.

```auto
   {../PtotAuxGen.props.text} * {../toggleGeneve.props.selected}
 + {../PtotAuxMac.props.text} * {../toggleEclairage.props.selected}

```

The selector switch returns a True (1) or False (0) which multiplies the individual counts.

---

<div class="post-metadata">

**Author:** ![hugobre](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@hugobre](https://forum.inductiveautomation.com/u/hugobre)\
**Post date:** [May 20, 2022, 9:59am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/5 "2022-05-20T09:59:45Z")

</div>

Ok that’s a logic way to do it.

I guess it will work

---

<div class="post-metadata">

**Author:** ![hugobre](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@hugobre](https://forum.inductiveautomation.com/u/hugobre)\
**Post date:** [May 20, 2022, 10:05am UTC](https://forum.inductiveautomation.com/t/change-custom-property-values-depending-on-switches/59823/6 "2022-05-20T10:05:09Z")

</div>

Thank you very much for your help !
