Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Do not want the Status area's Find button or Enter key to perform searches


This topic is 5981 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to implement security measures to allow users only to see certain records in a table (based on one of the table's field's values, which holds the Account Name of the person logged in).

In order to do that, I created a script to take the user to the layout and automatically filter the records shown by that "Account Name" field. Then, if they want to perform a search, I created a button that runs a script to insert the user's account name into the field value before performing the search (so the user doesn't see all the records but only the ones based on that Account Name field I set up in the table).

Here's the big problem:

Unfortunately, the user can avoid pushing my Find button to perform their search, by either clicking the Find button in the Status area, or by simply pressing the Enter key to perform their search. How do I turn that capability off so they can only perform a search by clicking on my button?

Posted (edited)

Hi Joni,

You can hide the status area with the script. Also, add "Allow user abort [Off]," so user cannot abort your current script.

NB: To hide status area --> Show/Hide Status Area [Hide] and mark the "Lock" to lock it.

Edited by Guest
NB: Add the Show/Hide Status Area
Posted

Even hiding and locking the status area will permit a user to hit "Enter" to continue a Paused script.

But I'm not sure that's even relevant here.

To prevent a user from accessing Find Mode on their own, you really need 9 Advanced to create custom menus.

You could use Privilege Sets to limit the menu options to "Editing", but I think you'll be disappointed in the other functions that become unavailable, which you can "add" back in under the Scripts menu, but that's pretty inelegant.

Then scripting such a find is a bit tricky, if you allow users to enter multiple search requests with omits.

Posted

Fudge. The Enter key DOES still work to perform a search. I don't have FileMaker 9 Advanced...

Is there a way to set up the fields in the database to only display values if the Account Name field matches the user logged in?

Yikes, there's gotta be some way for me to fix this security issue.

Posted (edited)

by simply pressing the Enter key to perform their search.

Try this:

On your find button execute a scipt to set a global variable to "Find"

Place a looping structure around your find script.

Allow user abort (off)

Set Variable [$$FindOK; Value:""]

Go to Layout [ "findForm" (table)]

Loop

Enter find mode

Pause / Resume Script (Indefinitely)

Exit loop if [$$FindOK = "Find"]

End Loop

Perform find

This should only allow your user to perform a find if the find button is pressed (i.e. the "Find" is passed to the global Variable)

Here is a sample file that uses the technique.

HTH,

Tim

p.s. also notice the behavior on the find button script is set to resume, not exit current running script. You can create any passing criteria check you wish in the "FindOK" script to filter the ability to find.

Lockeddownfind.zip

Edited by Guest
Posted

Version 2 of this file locks down accounts and privileges to limit the menu choices to the RegularUser & AnotherUser to limit navigation to find mode thru the standard filemaker menu bar and limits each user to view and modify only the records that are marked with their ownership. I believe all this can be achived without the Advanced version of filemaker. This is not as clean as what can be achieved with custom menus but does serve to secure access as requested.

All the restrictive work is done in the Privilege set Limited User.

HTH,

Tim

LockeddownFind_2.zip

Posted

I created a button that runs a script to insert the user's account name into the field value before performing the search

This is hardly necessary - if user is not permitted to view certain records, they will be automatically omitted from ANY find (and from portals, too). The only thing you need to worry about is Show All Records and Show Omitted Only - although even here the problem is purely cosmetic, since the forbidden records will be shown with "" in place of data.

Posted

This is hardly necessary - if user is not permitted to view certain records, they will be automatically omitted from ANY find (and from portals, too). The only thing you need to worry about is Show All Records and Show Omitted Only - although even here the problem is purely cosmetic, since the forbidden records will be shown with "" in place of data.

I use Active Directory Groups for authentication. In this particular case, each user needs to see different property records that they have checked out. They are all in the same AD group, but I use the Account Name to figure out which property records to show them. I am not familiar with all the Accounts & Privileges settings that are available in FileMaker. I have figured out how to limit access to fields, but I have not figured out how to only show a few records in a table. Is there a way to block access to certain records in a table based on the value of a field?

Right now, I am trying to only show records for a user if their account name matches the account name field value in the property table's property records.

Posted

I don't think it matters how an account is authenticated. What matters is the privilege set assigned to the account. In that set you need to define custom privileges for record access as limited to:

Get ( AccountName ) = CreatedByField

This topic is 5981 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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