# Refresh Vision table using a button popup

**URL:** <https://forum.inductiveautomation.com/t/refresh-vision-table-using-a-button-popup/82594>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [December 1, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/refresh-vision-table-using-a-button-popup/82594 "2023-12-01T16:14:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [December 1, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/refresh-vision-table-using-a-button-popup/82594/1 "2023-12-01T16:14:06Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b08f73328a0dae54e05eb646278576debee1f8cb.png)

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

```auto
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 ?

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 1, 2023, 4:20pm UTC](https://forum.inductiveautomation.com/t/refresh-vision-table-using-a-button-popup/82594/2 "2023-12-01T16:20:58Z")

</div>

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](https://docs.inductiveautomation.com/display/DOC81/system.gui.confirm).

Something like this:

```auto
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.

---

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [December 1, 2023, 4:36pm UTC](https://forum.inductiveautomation.com/t/refresh-vision-table-using-a-button-popup/82594/3 "2023-12-01T16:36:27Z")

</div>

thank you @bschroeder
