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.

Lock a record so it cant be deleted

Featured Replies

I have radio buttons in my database, one of which being SOLD. Every now and then I do a bulk delete to clear old records or duplicates. But my Fear is that I may accidentally delete a SOLD record in a purge. Is there anyway to set a permission to where anything marked SOLD can't be deleted in a bulk found records? I try to remember to OMIT SOLD in searches, but I would like to fool proof this!

You'd need to change the privilege set associated with your account to not allow delete if the record is SOLD.

  • Author

At risk of sounding like a moron... HOW do I do that exactly. Can you give me a walk through? Please?

See FM's Help Home > Designing and creating databases > Protecting databases > Creating and managing privilege sets > Editing record access privileges

... and then make sure you only ever use the database with the restricted account, not a full access (developer) account. :D

  • Author

See FM's Help Home > Designing and creating databases > Protecting databases > Creating and managing privilege sets > Editing record access privileges

I am still lost. I can't figure out how to make it NOT deleted the records with the Radio button for "SOLD" selected. I tried everything I could think of, and read the whole section provided, but I can't get it done. Can some one give me a walk through or another route.

First, make a backup of your database. :D

Create a new privilege set. Set the record access to custom, and for the table enter the delete option to Limited and enter the calculation

radiobuttonfield <> "sold"

Make an account, assign it to this privilege set. Open the database with the new account and test.

I would write a script which omits any sold record from a found set by using;

Constrain found set - and set to "omit" field 'sold'

delete all

Another thing to consider is to not ever delete records (as this deletes some history, doesn't it?). How about flagging the records with a status that'll suppress them from view? Or move them to an archived table?

  • Author

First, make a backup of your database. :D

Create a new privilege set. Set the record access to custom, and for the table enter the delete option to Limited and enter the calculation

radiobuttonfield <> "sold"

Make an account, assign it to this privilege set. Open the database with the new account and test.

I tried that, but now I can't ad or remove any records with that account. What am I doing wrong? Other than trying to work over my education level...

Another thing to consider is to not ever delete records (as this deletes some history, doesn't it?). How about flagging the records with a status that'll suppress them from view? Or move them to an archived table?

I only have one table with several layouts and fields. I am really not good enough with file maker to understand the multiple tables part. I am surprised i have gotten as far as I have to be truthful. If not for this forum, I would have been screwed!

I tried that, but now I can't ad or remove any records with that account. What am I doing wrong? Other than trying to work over my education level...

I only have one table with several layouts and fields. I am really not good enough with file maker to understand the multiple tables part. I am surprised i have gotten as far as I have to be truthful. If not for this forum, I would have been screwed!

Make sure you have the 'Available menu commands" set to all.

So long as you have a 'sold' record in a set you will not be able delete all found records. IN this instance you would need to run a script similar to the one I suggested earlier or a script which loops through the records deleting one by one.

  • Author

Thanks everyone that works great. The only problem I can see now is that if I have more than one radio button checked it ignores the SOLD delete restriction. For example: If I have SOLD and Follow Up (or Sold and Appointment)checked, it will delete that record, because "SOLD" wasn't the only button selected. I can probably live with this since it is rare to have more than one button selected.

You could change the condition to =

IsEmpty ( FilterValues ( "SOLD" ; RadiobuttonField ) )

However, a radio button is meant for single selections. Perhaps you should have a dedicated field for 'sold' status.

Change the calculation to be:

Not Isempty( FilterValues( radiobuttonfield ; "sold" ) )

This assumes the values in the field are paragraph delimited, which is true for radio button and checkbox fields.

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.