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

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

Recommended Posts

Posted

I'm using a database wich intends to serve as correspondance (mails letters etc) aplication.

It was incoming documentation and outgoing documentation. I've created a field in "incoming table" to validate the department where the original is going to, and created a [color:red]checkbox set with several entrances to sign all those departments who have cc of the incoming item, and should only view the record not edit it.

in privileges area i can give access easily to selected users to see the record where the their department is in the field wich has he original, but i cannot give access (view only or any other) to all the departments wich belong to the checkbox

can someone help

Posted

I don't use the privelege system to limit access to particular fields based on other fields often (mainly just block users out of sections) however, this is how it would work to a large extent (assuming that the user can edit if true).

A few notes:

The checkbox is a return delimited list of each item selected.

In order to check for a particular privelege set, we might use either a filter or substitute function (I prefer substitute).

Hence:

Substitute( ¶ & Table::CheckboxField & ¶ ; ¶ & Get(PrivelegeSetName) & ¶ ; "" ) <> ¶ & Table::CheckboxField & ¶

Posted (edited)

Basically you're just trying to see if the department of the person logged in is in the list of departments for that record (the checkbox field). The ¶ in the calculation are just to make sure there's no overlap. Example:

¶ (added by calculation)

Dept 1

Dept 2

Dept 12

¶ (added by calculation)

Oops, Dept 1 can be found within Dept 12. But "¶ & Dept 1 & ¶" can't. Another way to write what Genx did:

PatternCount ( ¶ & Table::CheckboxField & ¶ ; ¶ & Get(PrivelegeSetName) & ¶ )

That will evaluate to 1 or more (true) if the current Privelege Set Name is in the checkbox field. Genx's will evaluate true if removing the current Privilege Set Name changes the checkbox field. Same Boolean result.

You can't use = , because the checkbox field may have multiple entries.

Edited by Guest
no =
Posted (edited)

the picture i sent shows the "privileges" area.

and it's before the login that i want this calculation to be done, to check if the checkbox as the "aj" value.

can i sustitute the (getprevileges) by a value like "aj"

tanx

Edited by Guest
Posted

You can't use equals; there's multiple values in the checkbox. Yes, you need to find out if it "has" the value. There's several ways to do that, Genx, mine, and others (Position()).

If you put this calculation in the Edit box of the Record access privileges it will happen, you don't need to worry about that.

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