Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Access Query for Application restriction

amitasingh
New Contributor
New Contributor

Hello,

We have scenario of department and title wise restriction to request application.

The scenario is as follows:
User with 'A' Department have visibility of application for request(but not for X,YZ job titles), also those users who belongs from any department except dept 'A' but have this titles 'X','Y','Z'.


(Include department = 'A' OR titles=X, Y, Z (any department with titles X, Y, Z))

I tried with OR condition but it's not working.

where users.Departmentname='A' OR users.Title IN ('X','Y','Z')

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Validate

SELECT *
FROM users
WHERE (Departmentname = 'A' OR Title IN ('X', 'Y', 'Z'))


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

OR condition not working in access query at endpoint level. Only accepting IN, NOT IN, AND.

The users in the 'A' department, excluding those with titles X, Y, or Z, have visibility of endpoints on the ARS page, similar to other departments that include titles X, Y, or Z, except for the 'A' department.

Are you getting any error . Please share


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

 I tried with provided query but users from A department not visible to see that endpoint on ARS and same for titles with another department.
Endpoint requestable option is ON. 
when I am not using access query then endpoint visible on ARS. So, getting error with this query and may be OR condition not working in 24.1 version.

I tried with these ways. :

1) WHERE users.username NOT IN (SELECT u2.username FROM users u2 WHERE u2.departmentname = 'A' AND u2.title IN ('X','Y','Z')) AND (u.departmentname = 'A' OR u.title IN ('X','Y''Z'));

2) WHERE users.username NOT IN (SELECT u2.username FROM users u2 WHERE u2.departmentname = 'A' AND u2.title IN ('X','Y','Z')) OR(u.departmentname = 'A' OR u.title IN ('X','Y''Z'));

3)WHERE (u.title IN ('X','Y','Z')
AND u.departmentname != 'A') AND (u.departmentname = 'A' OR u.username NOT IN (SELECT username FROM users WHERE title IN ('X','Y','Z')));


Scenario to achieve :

The users in the 'A' department, excluding those with titles X, Y, or Z, have visibility of endpoints on the ARS page, similar to other departments that include titles X, Y, or Z, except for the 'A' department also have visibility.

Please share logs and microservice job status if its successful /failed 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.