Incremental Counter

  • 0
  • 1
  • Question
  • Updated 1 week ago
  • In Progress
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?
Photo of Steven Shaw

Steven Shaw

  • 170 Points 100 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,758 Points 5k badge 2x thumb
Hi Steve,

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

Thanks,
Gaurav
(Edited)
Photo of David Brogdon

David Brogdon

  • 582 Points 500 badge 2x thumb
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. 
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
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.