Discussions

Expand all | Collapse all

Incremental Counter

  • 1.  Incremental Counter

    Posted 10-28-2018 17:19
    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?


  • 2.  RE: Incremental Counter

    Posted 10-28-2018 17:32
    Hi Steve,

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

    Thanks,
    Gaurav


  • 3.  RE: Incremental Counter

    Posted 12-04-2018 15:21
    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. 


  • 4.  RE: Incremental Counter

    Posted 12-04-2018 18:12
    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.