Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › increment number by 1
- This topic has 3 replies, 2 voices, and was last updated 2 years, 6 months ago by
Brendan.
-
AuthorPosts
-
May 17, 2023 at 4:39 PM #49433
Glen ForisterParticipantI have a field that holds a numeric value. I have to select that field, delete the number that is there and replace it with a number + 1.
Is there a way to increment a numeric value without going to all that work with a script?
May 17, 2023 at 7:36 PM #49434
BrendanKeymasterHi Glen,
Is this a single record you need to keep incrementing? Or is it when you create a new record you want the field to have a new number + 1 set on it? Because with the latter, you can enable the auto-increment feature on a Number field to do this for you.
The iOS version of Tap Forms also has the ability to set the Input Control to be a Stepper, which would give you a button to increment or decrement the value. I haven’t added that to the Mac version yet though. But I should.
Thanks,
Brendan
May 18, 2023 at 9:17 AM #49435
Glen ForisterParticipantGot it, with an experimental field.
Now, what happens if I change an Numeric field to an incremental stepper field? Do I lose the data or does the data remain and I can increment it?BTW, I read the increment field information before I asked the question and what you said is clear, but in the manual on line it was very confusing and I thought it said the field would increment anytime the record was opened (my memory) so that is why I asked about scripting.
May 19, 2023 at 12:42 AM #49437
BrendanKeymasterThe field will increment only when adding a new record.
From the manual:
When a new record is created, Tap Forms uses the Next Default Value property to store it in the record for that field. It then adds the Increment Amount value and stores that in the Next Default Value property ready to be used for the next record.When you set the Number field to use the Stepper input control, it will just show you the current value but when you click the button it will increment or decrement the value.
You can always just add a new Number field to your form temporarily to try it out to see how it behaves. Again, just an iOS feature right now.
-
AuthorPosts
You must be logged in to reply to this topic.