How to create an auto-number for a item label

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
  • (Edited)
We have searched QuickBase and the Internet and found nothing useful so here's to hoping someone has something useful to share. 

We are creating a printable form. One of the items on the form is an auto-number based on a summary of labels. The auto-number is based upon the count of labels in a summary passed back to the label table. The problem is while the auto-number works, it updates all the labels and not the one we are creating.
We have tried to pass the number to another field.
We have tried to use dynamic form actions, which worked and then stopped working.

I read one post that talks about a snapshot but it links to an App that is no longer available. 

Has anyone had any luck generating auto-numbers from count summary fields or is there an easier way we cannot see?

Any ideas, or links to instructions or Apps are appreciated. 
Photo of Jim Harrison

Jim Harrison

  • 1,926 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,558 Points 50k badge 2x thumb
You have not really described you table and their relationships, but the usual trick is to do a summary field of the # records and then look that up back down to the child table.  Then create a new field which is a numeric field type and edit its field properties to make it a snapshot of the lookup field.  That snapshot will stay frozen once snapshotted and not change when the next child is created.

That field property setting is at the bottom of the field properties page. Note that it will not retroactively fix existing records.  That snapshot is frozen when the record is saved.
Photo of Jim Harrison

Jim Harrison

  • 1,926 Points 1k badge 2x thumb
Ahhhhhh!!! Thanks, I couldn't find this little nugget. 
Then create a new field which is a numeric field type and edit its field properties to make it a snapshot of the lookup field.  That snapshot will stay frozen once snapshotted and not change when the next child is created. That field property setting is at the bottom of the field properties page. Note that it will not retroactively fix existing records.  That snapshot is frozen when the record is saved.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,558 Points 50k badge 2x thumb
Quick Base is not difficult.  Except that there are like hundreds of easy things to learn.  So you need to stumble hundreds of times once. Now you know this trick and hopefully you just need to stumble once per nugget learned.  Or else watch all the videos in the Quick Base University.  https://university.quickbase.com/
Photo of Jim Harrison

Jim Harrison

  • 1,926 Points 1k badge 2x thumb
How do you deal with records getting deleted out of order? I have three records with snapshot 1,2,3. I delete record 2 and create a new record. Now I have records, 1,3,3. If I set this to be unique I get an error.

Is there a solution? 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,558 Points 50k badge 2x thumb
Well one choice is to not allow records to be deleted, but rather just marked as inactive.

The other option is to do another "loop" and do a summary maximum of the maximum snapshot value, and then look up that field down to the child records and then do a final snapshot field.  Then that will not change if a record is deleted.