Hi guys,
I would like to make a script that will add 1 (one) to an existing sum in a number field.
so that by double-clicking the field, it goes from, for instance, 110 to 111
But how can I do this?
kr.
John
Hi John,
There’s no function to trigger a script by double-clicking on a field.
However, you can have Tap Forms add 1 to another field if the Number field is manually changed by using a script.
When you call the record.getFieldValue(field_id)
function, the field that corresponds to field_id
will be monitored for changes. When the value changes in that field, the script will be executed and you can have it increment the value in another field, or return the value right from the script field which could be the monitored field’s last value plus one.
Thanks,
Brendan
I do something along these lines Brendan mentioned: I use a toggle field to trigger an action on another field. So for you, this could mean that toggling such field would increment your number field.
Don’t know if this helps, but you can auto-increment number fields when creating a new record.