Example: IDO filters

This example applies to the Row Authorizations form.

Simple IDO Filter Example: Username Property = Current User

You want to allow all users to see their own user information on the Users form (description, email address, group memberships, etc.) but not any other user's information. To do this, you would set the fields as follows:

Field Setting Notes
IDO UserNames The filter applies only to the UserNames IDO.
User   Leave blank so the filter applies to all users.
Group   Leave blank so the filter applies to users in all groups.
Property Username the User ID field on the Users form is bound to the UserNames.Username property. (The Usernames.Userid property is only used internally.)
(Operator) =  
This Value Current User  

When you click Add This Clause, the pseudo-SQL query that displays looks like this:


(Username = dbo.UserNameSp())

After you activate and save the filter, any user who logs in (and who has the proper authorizations for the form) can open the Users form but will see only the record that matches their user ID.

These topics show examples of more complex IDO filters:

How Filters Are Combined

The following information applies to complex situations, for example, when IDOs are inheriting from each other and each level has its own filters defined. An IDO that extends another IDO inherits all its filters, unless the IDO is using extend-and-replace.

Only filters marked Active will be used for all of the following.

The IDO filter clause is built by ANDing together all or any of these categories:

  • The general IDO filter, where both User and Group are blank
  • The user's IDO filter, where User equals the current login
  • The user's group's IDO filters, where Group equals any of the the current user's group memberships. (The group filters are ORed together, since the user should be able to see the rows visible to any of the groups the user belongs to.)

The clauses for the first two categories consist of all filters in that category ANDed together; the clause for the third category consists of the clauses for every group the user is a member of ORed together; the group clauses themselves are all the filters for that group ANDed together.

In other words, a user who is a member of several groups can see all of the data these different groups are allowed to see, but it may be restricted by the user's personal filters (and possibly the general filters, but usually the general filters would not be more restrictive than any of the group filters, because that would defeat their purpose). As an example, an IDO has these active filters:

Everyone: E1, E2;

User: U1, U2;

Group1: G1-1, G1-2;

Group2: G2-1, G2-2; 

The user who wants to access the IDO is a member of both Group1 and Group2. Then the constructed filter is set up like this:

(E1 AND E2) AND (U1 AND U2) AND ((G1-1 AND G1-2) OR (G2-1 AND G2-2))