cobrak69 Posted May 11, 2011 Posted May 11, 2011 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!
bcooney Posted May 11, 2011 Posted May 11, 2011 You'd need to change the privilege set associated with your account to not allow delete if the record is SOLD.
cobrak69 Posted May 11, 2011 Author Posted May 11, 2011 At risk of sounding like a moron... HOW do I do that exactly. Can you give me a walk through? Please?
bcooney Posted May 11, 2011 Posted May 11, 2011 See FM's Help Home > Designing and creating databases > Protecting databases > Creating and managing privilege sets > Editing record access privileges
Vaughan Posted May 11, 2011 Posted May 11, 2011 ... and then make sure you only ever use the database with the restricted account, not a full access (developer) account. :D
cobrak69 Posted May 12, 2011 Author Posted May 12, 2011 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.
Vaughan Posted May 12, 2011 Posted May 12, 2011 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.
Aussie John Posted May 12, 2011 Posted May 12, 2011 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
bcooney Posted May 12, 2011 Posted May 12, 2011 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?
cobrak69 Posted May 12, 2011 Author Posted May 12, 2011 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!
Aussie John Posted May 13, 2011 Posted May 13, 2011 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.
cobrak69 Posted May 13, 2011 Author Posted May 13, 2011 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.
comment Posted May 13, 2011 Posted May 13, 2011 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.
Vaughan Posted May 13, 2011 Posted May 13, 2011 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.
Recommended Posts
This topic is 5001 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now