Skip to main content
Question

Incremental Counter

  • October 28, 2018
  • 0 replies
  • 54 views

I have catalog that I imported and I want the style # for each new record added automatically. How do I go to the last style & add 1?
This topic has been closed for replies.

Hi Steve,

Do you have any pre-defined style # or any sequence?

Thanks,
Gaurav

  • Registered
  • December 4, 2018
Assuming there is a Parent Table,

Create a summary from the parent table called something like [# of Styles] then pull that summary field back down to the catalog/styles table.

Then create a numeric formula field with [# of Styles] + 1 and call it [Next Style #]

Make sure you have a text field on the form for "Style #"

Then just create a dynamic form rule that says, "If [Style #] is blank, change [Style #] to the value in the field [Next Style #].

Make sure you uncheck the box that says "Fire on change"

Now you should be able to change the style number manually if need be, while also having it auto-increment to the next number if you don't need to ever set it manually. 


Alternatively, you can just use the record ID# as it auto-increments natively. 

i strongly recommend using the [Record ID#] as the Style number.  if you like you can import  and then delete a bunch of records to roll the record ID ahead to say 1000 to have a 4 digit Style number.