G
Garrett Berneche
Long story short I want to filter a query's results based on
CurrentUser and the user group they belong to; ie. if the CurrentUser
is not in the "Supervisors" group then they can see only their own
records. I have a working function that tells me if CurrentUser is in
a given user group (IsUserInGroup("Supervisors")), and if the
CurrentUser is not in the group the query behaves as I would like. My
problem is that if the the user is in the group I don't know how to
make the query return all records.
In the criteria for the query, under USER_NAME I have tried...
Iif(IsUserInGroup("Supervisors"), ,CurrentUser())
Iif(IsUserInGroup("Supervisors"), "",CurrentUser())
Iif(IsUserInGroup("Supervisors"), "*",CurrentUser())
Iif(IsUserInGroup("Supervisors"), *,CurrentUser())
Iif(IsUserInGroup("Supervisors"), like *,CurrentUser())
Iif(IsUserInGroup("Supervisors"), null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), is null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), is not null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), true ,CurrentUser())
Iif(IsUserInGroup("Supervisors"), false,CurrentUser())
IIf(IsUserInGroup("Supervisors"),In (SELECT USER_NAME from
A_USERS),CurrentUser())
Any suggestions?
CurrentUser and the user group they belong to; ie. if the CurrentUser
is not in the "Supervisors" group then they can see only their own
records. I have a working function that tells me if CurrentUser is in
a given user group (IsUserInGroup("Supervisors")), and if the
CurrentUser is not in the group the query behaves as I would like. My
problem is that if the the user is in the group I don't know how to
make the query return all records.
In the criteria for the query, under USER_NAME I have tried...
Iif(IsUserInGroup("Supervisors"), ,CurrentUser())
Iif(IsUserInGroup("Supervisors"), "",CurrentUser())
Iif(IsUserInGroup("Supervisors"), "*",CurrentUser())
Iif(IsUserInGroup("Supervisors"), *,CurrentUser())
Iif(IsUserInGroup("Supervisors"), like *,CurrentUser())
Iif(IsUserInGroup("Supervisors"), null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), is null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), is not null,CurrentUser())
Iif(IsUserInGroup("Supervisors"), true ,CurrentUser())
Iif(IsUserInGroup("Supervisors"), false,CurrentUser())
IIf(IsUserInGroup("Supervisors"),In (SELECT USER_NAME from
A_USERS),CurrentUser())
Any suggestions?