Incrementing a Number
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2010 02:31 PM
Hello,
I am wanting to increment a field by one in a UI action that I am using. I think I need to write this in my UI action something similar to:
current.u_number = getNextObjNumber();
However, I don't want the next object number as this will just give me the next incident number. When my button is pressed (UI Action) I just want the field to be updated with 1 and then next time with 2, the next time with 3 and so on....
Think its just a piece of javascript that i'm missing.
Can anyone help?
Thanks
Labels:
- Labels:
-
Incident Management
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2021 04:58 PM
This should do the trick.
current.u_number++;
current.update();
action.setRedirectURL(current);