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.

Auto Serial Number depending on number of records.

Featured Replies

  • Newbies

I have two databases. 1.client address book which has a customer ID which is a auto serial number field.

2.Is a contract database.I have defined the relationship between the two databases using the customer ID.

Every time I enter a new record I want another field to generate a "Contract Number" According to how many contracts are there for that customer. Can anyone please help?

This can be done by a script starting in db1 "client address book". I assume you have a field in db2 "contract" "Contract Number". I assume the relationship is named "Contact"

In both db's add a calculated number field "Constant" = 34567 or any othe number that you like. Make a relationship in db2 to db1 using "Constant" as the key fields. Call it "Client".

In db1 add the following fields Last Contract Number a calculated number = Last (Contact::) Contract Number), gcustomer ID a global field of the same type as customer ID and gContact Number a global number field.

In db1 write a script to create a related record:

Set field [gcustomer ID, cusomer ID]

Set field [gContact Number, Last Contact Number + 1]

Perform script "New record" in db2.

In db2 write the "New Record" script

Create new record

Set field [customer ID, Client::gcustomer ID]

Set field [Contact Number, Client::gContact Number]

You then can enter data into this record.

You may want to add a script & button to go to db1.

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.