# Data Table entry from 2 sessions of the same project on different views

**URL:** <https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 26, 2025, 8:31pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272 "2025-03-26T20:31:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Ford-King](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Alex\_Ford-King](https://forum.inductiveautomation.com/u/Alex_Ford-King)\
**Post date:** [March 26, 2025, 8:31pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272/1 "2025-03-26T20:31:41Z")

</div>

I have a data entry page set up to enter data into the database and a table bound to that database to display it. This is on one page of the project. On another page in the same project I have a table bound to the same database so an operator can see the data entered. I had no problems setting it up so the data shows on both sessions but I have a column with a Bool data type I want the operator to use to acknowledge the incoming data. I want the first screen to see the bool column change when the operator acknowledges it. I tried having a runPrepUpdate on the editCellCommit

```python
def runAction(self, event):
	valueToSet = event.value    
	self.props.data = system.dataset.setValue(self.props.data, event.row, event.column, valueToSet)

	
	# Get the updated value and the row ID
	
	row_id = self.props.selection.selectedRow
	

	
# Define the query
	query = """ Update EVISDATA

	Set Inspected = 1

	where id = ?

	"""
	db = "POC_Ignition_Plant_SCADA"
# Execute the query

	system.db.runPrepUpdate(query,[row_id],db)

```

This executes without error but still no change on the first screen.

Any help would be appreciated!

---

<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:** [March 26, 2025, 8:45pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272/2 "2025-03-26T20:45:44Z")

</div>

You need to send a message from the update script to all clients to refresh the table binding.

> **[system.util.sendMessage | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-sendMessage)**
>
> This function sends a message to clients running under the Gateway, or to a project within the Gateway itself.

---

<div class="post-metadata">

**Author:** ![Alex\_Ford-King](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Alex\_Ford-King](https://forum.inductiveautomation.com/u/Alex_Ford-King)\
**Post date:** [March 26, 2025, 8:49pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272/3 "2025-03-26T20:49:59Z")

</div>

Even if I have polling on for both tables? Wouldn't sending a message to refresh do the same thing?

---

<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:** [March 26, 2025, 8:57pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272/4 "2025-03-26T20:57:11Z")

</div>

One would imagine it would. I never use polling so you'll have to wait for someone else.

If I wanted to check if the polling was running I might add a UNION line into the query and put the SQL NOW() function to return an extra row (with the same column names) with the time inserted in a suitable column. That should be visible in the table.

---

<div class="post-metadata">

**Author:** ![Alex\_Ford-King](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Alex\_Ford-King](https://forum.inductiveautomation.com/u/Alex_Ford-King)\
**Post date:** [March 26, 2025, 10:53pm UTC](https://forum.inductiveautomation.com/t/data-table-entry-from-2-sessions-of-the-same-project-on-different-views/104272/5 "2025-03-26T22:53:49Z")

</div>

was able to figure it out. Need to make some changes to my code. Thanks for the help anyway @Transistor

New code for reference

```python
if self.props.selection.selectedColumn == "Inspected":
		isEnabled = not self.props.data.getValueAt(event.row, 'Inspected')
		if isEnabled == True:
			setEnabled = 1
		else:
			setEnabled = 0 
				
	id=self.props.data.getValueAt(event.row, 'id')
	
	
	
# Define the query
	query = """ Update EVISDATA

	Set Inspected = ?

	where id = ?

	"""
	db = "POC_Ignition_Plant_SCADA"
# Execute the query

	system.db.runPrepUpdate(query,[setEnabled,id],db)
	
	self.refreshBinding("props.data")

```
