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.

Serial Number Work-Around

Featured Replies

Is there a way to set a number field to always be equal to the value of the same field from the previous record..... plus an increment of 1?

What I have in mind is something that produces a similar result to an auto-enter serial number.

What I want to be able to do is delete a record in the middle of a list and have the number value for the next record adjust itself automatically to be equal to the new "previous" record.

I hope this makes sense.

Any ideas?

Take a look at the Auto Enter Options available for the Fields.

In the Define Fields, Click on the Field to be serilized, click on Options, Auto Enter, Serial Number.

Lee

Edited by Guest

Is there a way to set a number field to always be equal to the value of the same field from the previous record..... plus an increment of 1?

What I have in mind is something that produces a similar result to an auto-enter serial number.

What I want to be able to do is delete a record in the middle of a list and have the number value for the next record adjust itself automatically to be equal to the new "previous" record.

I hope this makes sense.

Any ideas?

Why do you want to do this? I suppose there are some reasons for it, but most of the time it is unnecessary. In a relational setup, changing ID numbers (especially if you are using them as the match field in the relationship) opens you up to a host of problems both now and as you get more data in the solution.

For your ID fields, I would stick to the normal Auto-enter serial numbers that Lee mentioned. If you really need a field consecutively numbered, you can look at the Get(RecordNumber). But keep in mind that it is very dependent on the context of the found set. Changing the found set, and sort order I believe, will affect the number if gives you.

Otherwise you could look at creating a list of numbers that you update as you create and delete records, to keep track of what is used and what is not. Kind of a transactional model of sorts.

Edited by Guest

Hi jmormond,

Good catch, and I totally agree with you.

Lee

It's unclear what you're trying to accomplish, but an unstored calculation field = Get(RecordNumber) may be what you want.

  • Author

Thanks guys for your help.

FWIW:

I include a serial number field on almost every database I write.

As Lee suggested, I do this with an auto-enter, serial number option.

For this particular application I am trying to serialize tasks for building processes in my cabinet shop.

Usually the task list is developed proactively.

In this case the auto enter serial number option works fine.

Often times, however, someone will add a task on an adhoc basis. This task will either be something that we forgot or something we refined. In this case we still want the tasks to array sequentially (task 1 thru 10) but can't get there with just the serial number.

Use the Replace command to re-serialise the records after they have been changed.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.