# Vision table set new value in cell

**URL:** <https://forum.inductiveautomation.com/t/vision-table-set-new-value-in-cell/71147>\
**Category:** Ignition\
**Tags:** vision, ignition81, scripting\
**Created:** [March 16, 2023, 9:24am UTC](https://forum.inductiveautomation.com/t/vision-table-set-new-value-in-cell/71147 "2023-03-16T09:24:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [March 16, 2023, 9:24am UTC](https://forum.inductiveautomation.com/t/vision-table-set-new-value-in-cell/71147/1 "2023-03-16T09:24:24Z")

</div>

Hi guys,

I tried to insert a row in the dataset when the button click. In my case row was inserted successfully in the database but at times only insert a single cell.

I have tried to set new values in multiple cells and then insert rows in the database using a button click but I'm not able to set multiple cell new values.

any idea?

Below is the script used in table propertyChange:

```auto
if event.propertyName == 'selectedRow':
	dsData = event.source.data
	row = event.source.selectedRow
	col = event.source.selectedColumn
	newValue = event.newValue
	if row != -1 and col != -1:
		newData = system.dataset.setValue(dsData,row, col,newValue)
		event.source.data = newData

```

Thanks in advance!!  
Priyanka

---

<div class="post-metadata">

**Author:** ![Ashish\_Narula](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Ashish\_Narula](https://forum.inductiveautomation.com/u/Ashish_Narula)\
**Post date:** [March 16, 2023, 9:48am UTC](https://forum.inductiveautomation.com/t/vision-table-set-new-value-in-cell/71147/2 "2023-03-16T09:48:10Z")

</div>

system.dataset.addRow or system.dataset.addRows should work for you create a list of parameters you would like to update provide dataset name row index and list of values. Pass these as parameters check in manual for reference.

---

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [March 16, 2023, 12:21pm UTC](https://forum.inductiveautomation.com/t/vision-table-set-new-value-in-cell/71147/3 "2023-03-16T12:21:45Z")

</div>

@Ashish_Narula Thanks for your response.

Resolved my problem using polling mode.
