# GUI - Perspective - Confirm / Cancel popup

**URL:** <https://forum.inductiveautomation.com/t/gui-perspective-confirm-cancel-popup/83968>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 9, 2024, 2:21pm UTC](https://forum.inductiveautomation.com/t/gui-perspective-confirm-cancel-popup/83968 "2024-01-09T14:21:08Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 9, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/gui-perspective-confirm-cancel-popup/83968/41 "2024-01-09T16:56:28Z")

</div>

Any error message in your logs ?

> [@HelloWorld](#):
>
> Named queries must be different in message handlers because if I copy that code on a button it works and successfully deletes???:?

Try removing the project name.

As @lrose said, you're using a regular transaction for named queries. Use a namedQueryTransaction.  
But I also agree with him: That's hardly transaction-worthy. If you're never rolling back...  
In this particular case, I'd probably just build the query dynamically and use `runPrepUpdate` just once.

something like

```python
q = """
delete from your_table
where id in ({})
""".format(','.join('?' * len(selRows)))

system.db.runPrepUpdate(q, [product['ProductID'] for product in selRows])

```

Also, don't use `id` as a variable name, it's a built-in identifier. While it may not cause any harm in this situation, I suggest never using built-in names for your own stuff.

---

_[View the full topic](https://forum.inductiveautomation.com/t/gui-perspective-confirm-cancel-popup/83968)._
