# Updating the Power Tabel Data set value according to the Property tag change

**URL:** <https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581>\
**Category:** Ignition\
**Tags:** python, ignition81, vision, scripting\
**Created:** [September 5, 2024, 10:37am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581 "2024-09-05T10:37:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adarsh\_Shelar](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Adarsh\_Shelar](https://forum.inductiveautomation.com/u/Adarsh_Shelar)\
**Post date:** [September 5, 2024, 10:37am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/1 "2024-09-05T10:37:14Z")

</div>

Hi Team,

So, in my current Project I have used one **Power table based on the Property** change need to update the Value in the Row data set of power table, just need the idea on **what is the script format we are using for the above requirements** ,  
find the attached image for the reference,  
As I have 3 conditions,  
A, B & C So according to the drop-down selection need to change the Data set in row or column **IO\_NUmber & Description** need to change,  
Where input status remains ideal.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb6837ed878330cc73aa357f1a84e51aaf965336.jpeg)

Thanks Team,  
Adarsh ✨

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 5, 2024, 11:35am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/2 "2024-09-05T11:35:50Z")

</div>

How is the table's data populated?

---

<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:** [September 5, 2024, 12:02pm UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/3 "2024-09-05T12:02:04Z")

</div>

Your post seems to be missing some punctuation. This makes it difficult to know where one sentence ends and the next one begins so the meaning is unclear. Can you edit to fix it? (Use '.' at the end of a sentence, not ','.) I understand that English may not be your first language.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 7, 2024, 9:47am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/4 "2024-09-07T09:47:54Z")

</div>

You could use the dropdown's `selectedIndex` property to drive the data:

```python
if event.propertyName == 'selectedIndex':
     # drive the data change here

```

...but depending on where you are getting your data, it's likely that a binding that uses the `selectedLabel` or `selectedStringValue` property of the dropdown would be a lot better than a property change script.

---

<div class="post-metadata">

**Author:** ![Adarsh\_Shelar](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Adarsh\_Shelar](https://forum.inductiveautomation.com/u/Adarsh_Shelar)\
**Post date:** [September 16, 2024, 7:27am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/5 "2024-09-16T07:27:27Z")

</div>

Hi @justinedwards.jle

“I have one power table and three conditions that need to change the row values in the **Description** column based on the conditions.  
so what is the format of script need to be use.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/5/15d3ed526051d7c96a15ae7388fcbc9243b21b14.jpeg)

Thank You,

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 16, 2024, 11:40am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/6 "2024-09-16T11:40:41Z")

</div>

You have yet to answer the question on where the data is coming from. Is this a query? Dataset tags?

@justinedwards.jle gave you a pretty good clue, but I'll elaborate a bit further:

I would create three custom properties on the power table with the relevant result of each dropdown (Following your original post, I'll call them A, B, and C).

Then, if you script it, it would start with something like:

```python
if event.propertyName in ('A', 'B', 'C'):
    do_some_stuff()

```

---

<div class="post-metadata">

**Author:** ![Adarsh\_Shelar](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Adarsh\_Shelar](https://forum.inductiveautomation.com/u/Adarsh_Shelar)\
**Post date:** [September 17, 2024, 6:13am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/7 "2024-09-17T06:13:32Z")

</div>

HI @JordanCClark ,  
The data is Coming from the Dataset Tags,

**if the Property changes to 1 then need to update the Value in description table as 1Station IO\_1,1Station IO\_2, 1Station IO\_3,**

**If the Property changes to 2 then need to update the Value in description table as 2Station IO\_1,2Station IO\_2, 2Station IO\_3,**

**If the Property changes to 3 then need to update the Value in description table as 3Station IO\_1,3Station IO\_2, 3Station IO\_3,**

Thanks for Advance.

Regards,  
Adarsh

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 17, 2024, 9:06am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/8 "2024-09-17T09:06:19Z")

</div>

This sounds like a job for [indirect tag bindings](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/binding-types-in-vision/indirect-tag-bindings-in-vision).

---

<div class="post-metadata">

**Author:** ![Adarsh\_Shelar](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Adarsh\_Shelar](https://forum.inductiveautomation.com/u/Adarsh_Shelar)\
**Post date:** [September 18, 2024, 6:17am UTC](https://forum.inductiveautomation.com/t/updating-the-power-tabel-data-set-value-according-to-the-property-tag-change/95581/9 "2024-09-18T06:17:09Z")

</div>

Yes, @JordanCClark
