How to have a value increase or decrease by the value of 1
Posted: Sat Jan 03, 2015 11:58 am
by Mark7294305
I have created a database with several columns. Lets say column B have the current value of 5. I want Column C to be the value of Column B + 1 (this is 6) and column D to be Column B – 1 (that is 4).
What JS code do I need to type to allow this to work?
Thanks
Mark
How to have a value increase or decrease by the value of 1
Posted: Mon Jan 05, 2015 2:39 am
by Yurii Orishchuk
Hi Mark,
It very depends on use case you need for your app:
If you want to do it on item create - you need:
1.1. Link input value to B, C and D request parameters.
1.2. On C link click on JS and populate it with following JS code:
pre
return parseInt(value) + 1;
/pre
1.3. On D link click on JS and populate it with following JS code:
pre
return parseInt(value) - 1;
/pre
Regards.