# Sometimes, we need to be protected from ourselves

**URL:** <https://forum.inductiveautomation.com/t/sometimes-we-need-to-be-protected-from-ourselves/9098>\
**Category:** General Discussion\
**Created:** [September 25, 2014, 12:34pm UTC](https://forum.inductiveautomation.com/t/sometimes-we-need-to-be-protected-from-ourselves/9098 "2014-09-25T12:34:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 25, 2014, 12:34pm UTC](https://forum.inductiveautomation.com/t/sometimes-we-need-to-be-protected-from-ourselves/9098/1 "2014-09-25T12:34:01Z")

</div>

```auto
press = str(event.source.parent.getComponent('Table').press)
dieNum = int(event.source.parent.getComponent('Table').WintrissTool)
desc = str(event.source.parent.getComponent('Table').Description)
ndx=int(event.source.parent.getComponent('Table').ndx)
if ndx > 0
  if system.gui.confirm("Are you sure you want to remove this die?", "Remove Die?"):
    if system.gui.confirm("<html>Are you REALLY SURE you want to remove THIS die?<br>Press: %s<br>Tool Number: %d<br>Desc.: %s" % (press,dieNum,desc), "REALLY Remove Die?"):
      if system.gui.confirm("<html>Look, I can understand if you don't really want to. It's a bit of a commitment and there's no going back...", "REALLY REALLY PINKY SWEAR Remove Die?"):
        system.db.runUpdateQuery("DELETE FROM stamping_die_info WHERE ndx=%d" % (ndx), "Production")
        system.gui.messageBox("<html>OK, it's removed. Don't say I didn't warn you...", "Die Removed")
else:
  system.gui.messageBox("No die selected")
```

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 25, 2014, 1:14pm UTC](https://forum.inductiveautomation.com/t/sometimes-we-need-to-be-protected-from-ourselves/9098/2 "2014-09-25T13:14:11Z")

</div>

+1 for pinky swear. 😃
