May 11, 201114 yr 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!
May 11, 201114 yr You'd need to change the privilege set associated with your account to not allow delete if the record is SOLD.
May 11, 201114 yr Author At risk of sounding like a moron... HOW do I do that exactly. Can you give me a walk through? Please?
May 11, 201114 yr See FM's Help Home > Designing and creating databases > Protecting databases > Creating and managing privilege sets > Editing record access privileges
May 11, 201114 yr ... and then make sure you only ever use the database with the restricted account, not a full access (developer) account. :D
May 12, 201114 yr 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.
May 12, 201114 yr First, make a backup of your database. 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.
May 12, 201114 yr 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
May 12, 201114 yr 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?
May 12, 201114 yr Author First, make a backup of your database. 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!
May 13, 201114 yr 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.
May 13, 201114 yr 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.
May 13, 201114 yr 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.
May 13, 201114 yr 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