Skip 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.

How can I lock a file so no new records can be created?

Featured Replies

I would like to lock one of my DB files so that a new record can ONLY be created by running a script in another file? I would like to do this to avoid DUPLICATE join files. Here is my setup:

I have 3 files: an invoice file, a payment entry file, and a payment items file. The Invoice and payment files are reltated by the key field "invoice_id". The payment entry and payment item files are related by the key field "payment_id". A script in the Invoice file copies the value of "invoice_id" into a global and takes the user to the payment entry file. Another script creates a new record and pastes the global into the payment "invoice_id" field. This keeps the invoice_id constant in each of my files (Is this the worng way?). I am using an IF-ELSE validaiton script to keep the user from creating a duplicate from the script entry in the Invoice file. However, a user could still press "Command-N" and manually create a new record in the payments file. Since they didn't use the script, the validation doesn't run and I end up with two files with the same "invoice_id".

Maybe I'm approaching this the wrong way.

Any help is GREATLY appreciated.

Thanks!

You need to create a user password with the "Available Menu Commands:" setting set to "None". With this accomplished, the only way a user has to create a new record is to run a script.

I'm guess that when you say "files" you really mean "records" ("two files with the same invoice_ID"). In database design this is like mixing up the terms "asprin" and "cyanide" in medicine! wink.gif" border="0.

-bd

  • Author

No, I mean 2 separate database files that are related by the invoice_id field.

The approach is the same. Eliminate menu commands and force the user to create new records only with a script (command-N doesn't exist). The script can then validate an operation to the level you desire. -bd

Why do you need to create new record via script, why not set up the group password with

The pref password set up to allow or not to allow creation of records?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.