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

Certifier - Select from Manual Query

GSR
New Contributor III
New Contributor III

Hello,

My requirement is to launch certification for user accounts for specific application.

Certifier has to be dynamic based on country.

If user is from Country A then Assign to "ABC' As certifier

If user is from Country B then Assign "BCD' As certifier

Please guide me how to achive this.

 

Thank you.

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Sample query -  u.id in (select manager from Users where id=:loggedInUser)

Based on this prepare query for your requirement


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

GSR
New Contributor III
New Contributor III

tried below did not work : Invalid SQL syntax error

 

u.username IN (SELECT DISTINCT
case when (u1.country = 'ABC') then '12345'
when (u1.country = 'DEF') then '5678'
else '9876'
end as 'ID'

from
Users u1

WHERE
u1.statuskey=1
u1.id =:loggedInUser)

Keep in same line 

u.username IN (SELECT DISTINCT CASE WHEN u1.country = 'ABC' THEN '12345' WHEN u1.country = 'DEF' THEN '5678' ELSE '9876' END FROM Users u1 WHERE u1.statuskey = 1 AND u1.id = :loggedInUser)


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

GSR
New Contributor III
New Contributor III

Query worked but campaign moved to launching state and stuck there. I have picked only one endpoint with 5 users

Check logs for error. It won't work ideally at only 1 Primary certifier is allowed 


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