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

Perform find / Enter find mode OR parameter?


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

Recommended Posts

Posted

Hi,

I have a table with 2 fields (sales rep 1 and sales rep 1). Now what I want to do is when a sales rep logs in, he only sees his sales when he is listed as sales 1 OR sales 2. Now I noticed that in the script editor when you use a perform find / enter find mode and specify there that is shows

Field Criteria

a =d

AND b =c

so is there a way to work with an OR ?

Posted

Yes, New Request. Each request is an OR.

However, it would be better to not use two fields, but rather two related records.

If the parent record is a Sales record, then the child table would be SalesRefs. This table would contain at least the parent SalesID and a RefID (perhaps using StaffIDs from a Staff table).

If you want a user to only view the Sales for which he is listed as one of the Refs, then you need to use a record level access rule. If you create a calc field in Sales, Refs_c = List (sales_SALESREFS::_kF_RefID) result text, and set the view access to allow viewing when the user's ID is one of the IDs in the Refs_c field. The rla calc would be:

Patterncount ( Refs_c; gUserID )

Set gUserID in an Open script.

I'm not sure you'll follow this completely, so pls reply with questions. This is a very standard technique.

Posted

@bcooney. I am a novice and am interested in the original poster's question. I too am considering providing a view based on user.

Can it be as simple as using the security setting I already use for login, and based on account, have the database display only records entered by that user? The Get(AccountName) is the easy part for me, already using that to set some default autofills. Would it then be a sort on user on entry into any layout? Sounds easy enough, always does... it is between the thought in my mind and the keyboard where the problem typically occurs.

Thanks

Posted

BBud,

This is called record level access and is the use of FM's Security feature.

See here: http://fmforums.com/forum/showtopic.php?tid/198109

This topic is 5138 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.