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.

Allowing only 1 record

Featured Replies

I have a table for company and I want to allow only one company to be entered therfore, only one record to be made. I started with making a serial field and trying to make a calculation that makes it unique and allowing only one number. But that doesn't work. How can you allow a number of records to be made in a table?

Just disable the users ability to add records through the menu. You can do this in Accounts & Privs. Then, make a button for them to create a record. In that button perform a simple If script.


[if: Get(FoundCount) ≥ 1]

[Error you cannot create a new record]

[else]

[create new record]

Hi Himitsu

ok for unique validation of field CompanyName.

ok for Zero Tolerance advice to disable users ability to add records through the menu.

But for the script to attach to the "New Record" button, I think that is better this type:

Set Error Capture [on]

New Record/Request

Show Custom Dialog ["Do you want to insert a new company ?";Companies:CompanyName]

Commit Record/Requests[]

If [Get(LastError)>0]

Show Custom Dialog ["ATTENCTION"; "this company is already in the DB"]

DeleteRecord/Request [No dialog]

End IF

Don't use a script or calc. Just use a relationship where the "left" side of the relationship is an unstored calc = 1 and the right side is the record ID, set the relation to allow creation of related records. Don't provide access to the record on layouts based on this table (users could dup or delete or create new record)

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.