Title

Script to perform find in checkbox field

Post

I need to have the user who's logged in (account name, I believe) have access to only those records that has that user's name in a checkbox field.

The file in question is a rolodex file. The thinking is that there is one, master file. The checkbox field includes various user's names. So then any given record could be accessible by one or more people, but only if their name is checked. I'm not sure if this can be done with privilege sets, so I'm trying to get a script working that upon opening the file, finds only those records with: the current account name = name checked off in a checkbox field. If I do a manual find, it always works, and of course my found set is just what I would expect. Any scripting I have done always fails (no records match this find criteria). I have tried a script that is basic: Enter find mode, Set Field, Perform Find. I also tried a script that uses a variable ($) in a find request.

I could be going about this the wrong way, so if anyone has some simple way to achieve my goal I'll be happy to say DUH! and I thank you very much.

Should find all records where the current account name is selected in YourTable::yourcheckboxfield.

You might want to use manage | Security... to control access to these records:

Not Isempty ( Filtervalues (yourcheckboxfield ; Get ( AccountName ) ] could be used to set up record level access control:

See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.

Thanks very much. That script is the one that I was using, and still there are issues with the existing rolodex file.

BUT:

I tried it on a new file and it works fine, so I suspect there are other things going on, maybe pre-existing privilege sets.

At worst, I could rebuild the file from scratch, and keep testing the script as I add fields and make changes.

I will visit "See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up." That seems very appropriate for my needs.