# onClick Icon to add/subtract 1 from numeric entry

**URL:** <https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 14, 2025, 6:00pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268 "2025-05-14T18:00:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![crumberger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/crumberger/32/79956_2.png) [@crumberger](https://forum.inductiveautomation.com/u/crumberger)\
**Post date:** [May 14, 2025, 6:00pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268/1 "2025-05-14T18:00:21Z")

</div>

I'm making a downtime entry pop-up for an Operator console, and I'm still quite new to everything Ignition and coding. I know the numeric entry has a "spinner" option, but this console is going to be accessed more from a touch screen than with a mouse and I want to make this more user friendly. How do I get the + and - to function to add or subtract time from the numeric entry input?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/296e13977ff5944c47098ee9441ed67225bdefc3.png)

---

<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:** [May 14, 2025, 6:06pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268/2 "2025-05-14T18:06:26Z")

</div>

What have you tried?

Simply taking the custom property that represents the minutes, and adding or subtracting 1 from that value and writing it back to the property should do what you want...

---

<div class="post-metadata">

**Author:** ![crumberger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/crumberger/32/79956_2.png) [@crumberger](https://forum.inductiveautomation.com/u/crumberger)\
**Post date:** [May 14, 2025, 6:13pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268/3 "2025-05-14T18:13:34Z")

</div>

When I say I'm new to everything Ignition, I continue to surprise myself every time something works, because I had zero scripting experience going into this project.

---

<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:** [May 14, 2025, 6:25pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268/4 "2025-05-14T18:25:19Z")

</div>

So you don't have anything written at all? You might want to hit up Inductive University and review scripting, and Perspective before delving into this.

---

<div class="post-metadata">

**Author:** ![IAsbox](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@IAsbox](https://forum.inductiveautomation.com/u/IAsbox)\
**Post date:** [May 14, 2025, 8:57pm UTC](https://forum.inductiveautomation.com/t/onclick-icon-to-add-subtract-1-from-numeric-entry/106268/5 "2025-05-14T20:57:42Z")

</div>

Essentially you are trying to build a script on those +/- buttons to increase the time. System Functions ([System Functions | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions)) are your friend - once you understand the different system functions available to you and look at the sample scripts, you can start building scripts to complete these desired functions.

As an example, your code could look something like this for the +:

```python
	newTime = system.date.addMinutes(self.getSibling("DateTimePicker").props.value , 1)
	self.getSibling("DateTimePicker").props.value = newTime

```
