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.

Featured Replies

  • Newbies

I have a database that has sequence numbers, in the field "Sequence", that increment by 1 everytime a new record is created. The number needs to start at 1 each month and go as high as it necessary until the end of the month. When the next month begins, that field needs to be reset to 1 again. IS THERE A WAY TO DO THIS AUTOMATICALLY? Otherwise, I will have to remember to go in and reset the numbers manually, which is an option I do not care for. Please help!

quote:

Originally posted by hawk02:

I have a database that has sequence numbers, in the field "Sequence", that increment by 1 everytime a new record is created. The number needs to start at 1 each month and go as high as it necessary until the end of the month. When the next month begins, that field needs to be reset to 1 again. IS THERE A WAY TO DO THIS AUTOMATICALLY? Otherwise, I will have to remember to go in and reset the numbers manually, which is an option I do not care for. Please help!

Automatically? Hmm, that could be difficult. You could use a self-relationship by some kind of compound key.

Create a calculation called MonthKey = Date(Month ( CreationDate ), 1, Year ( CreationDate ) ). This assumes that you have a field called CreationDate which is simply an autoentered date created field.

Now create a self-relationship (Self by MonthKey), sorted in descending order by SequenceNumber.

Finally make your SequenceNumber a number field with an auto-entered calculation something like this : If ( IsValid ( Self by MonthKey::SequenceNumber ), Self by MonthKey::SequenceNumber + 1, 1 ).

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

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

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

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

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.