July 17, 200718 yr I have what would be classified as a "text serial number" that I need to increment by 1 upon certain user actions. The field needs to display with leading zeroes. For example: "0001002" would increment to "0001003". Can this be done without using a custom "pad text" function?
July 17, 200718 yr Hi any text field with autoenter option can do what you are after; simply start with "next value" = 0001001
July 17, 200718 yr K1200: The trick is to make it a Text field, not a Number field. This will keep the leading zeros in place. -Stanley
July 17, 200718 yr Author Thanks for the response. These fields are not actual serial numbers, so I can't use the normal auto-increment method that FileMaker provides in the field definition. The numbers need to be incremented after the record is created (in response to user actions), so what I'm needing is a "text math" method that can accommodate the leading zeros. Stanley: the field is already text. How can it be incremented?
July 17, 200718 yr Author Amazingly (to me), it DOES work! -- but I can't exactly see how it does. It seems it would simply concatenate the "000000" on the front of the incremented result, but somehow it merges. I know I'm overlooking something in trying to understand this, but what? UPDATE: OK, I see it. It does merge, but then eliminates the "overflow". (This has just been one of THOSE days.) Thanks.
July 17, 200718 yr Author The perfect choice. An aside: my search of the Calculation Forum this morning for "increment" didn't show any result that I could recognize as a solution. Now (after the fact)searching FileMaker's Help turns up nine topics; SerialIncrement is number six. Note to self: "must remember to try multiple resources when stumped". Consolation: "maybe someone will see these posts and learn from them". Thanks, comment.
Create an account or sign in to comment