Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

restarting a serial sequence

Featured Replies

I have a service call database. I need to assign a unique number for each call. The first part of the number is the date. The second part of the number is to be the number of calls taken that day up to that point.

So, the first call on January 4th 2001 will be #010104-001. The fifth call on that day will be #010104-005. The second call on January 5th 2001 will be #010105-002.

Any clues on how to generate that 001, 002, 003 sequence and then restarting the next day automatically.

Thanks.

quote:

Originally posted by jpkrey:

I have a service call database. I need to assign a unique number for each call. The first part of the number is the date. The second part of the number is to be the number of calls taken that day up to that point.

So, the first call on January 4th 2001 will be #010104-001. The fifth call on that day will be #010104-005. The second call on January 5th 2001 will be #010105-002.

Any clues on how to generate that 001, 002, 003 sequence and then restarting the next day automatically.

First setup a date field and a sequence field.

Setup a relationship by today's date to the date field, sorted by the sequence number, in descending order (i.e. highest first).

Then when creating records, check this relationship. If it is not valid (i.e. this will be the first record of the day) assign your call number as date & "001". If the relationship is valid, then assign your call number as date & sequence number + 1.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Author

Thank you.

How do you check to see if the relationship is valid? This is new idea to me.

There's a function called IsValid which takes as its argument a related field and returns true if there's a valid relationship for the current record.

Chuck

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.