Refresh Vision table using a button popup

Hello I have view vMain where I put data table DataTurbine.
I set a button delete on vMain. When user click on delete button, a popup pDelete is open to confirm user if he want delete data.

on popup pDelete, I have 2 button, YES and NO
I can delete , but I would like reflesh data of DataTurbine when I click on button YES of popup pDelete.

If there is not popup to cOnfirm user, I can refresh DataTurbine using

table = event.source.parent.parent.getComponent('DataTurbine')
system.db.refresh(table,'data')

How can I refresh data when I click on button YES of popup pDelete ?

Rather than creating a specific popup to handle the confirm, use the system.gui.confirm function: system.gui.confirm - Ignition User Manual 8.1 - Ignition Documentation.

Something like this:

if system.gui.confirm("Do you want to delete data?","Confirm Delete"):
	#Do delete statement here.
	table = event.source.parent.parent.getComponent('DataTurbine')
	system.db.refresh(table,'data')

This would go behind your delete button on the actionPerformed event.

2 Likes

thank you @bschroeder