Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/06/2024 08:42 PM
Hello Team,
We are working on Register user form and we have an attribute called manager on the form.
Attribute Type: Single Select From SQL Query
Values: select username as ID, CONCAT_WS(', ',IFNULL(customproperty8,lastname),IFNULL(preferedFirstName,firstname)) as inlinedescription from users where username in (select distinct owner from users where owner is not null and statuskey=1);
Solved! Go to Solution.
06/06/2024 09:07 PM
select u.userkey from request_access_attrs raa, request_access ra, Users u where u.username = raa.ATTRIBUTE_VALUE and raa.REQUEST_ACCESS_KEY = ra.REQUEST_ACCESSKEY and ra.REQUEST_ACCESSKEY = ${REQUESTACCESS.id} and raa.attribute_name = 'manager'
06/06/2024 09:21 PM
It now got assigned to admin at creation stage only
06/06/2024 09:36 PM
I hope you updated dynamic attribute name in query
06/06/2024 09:38 PM
Yes, my DA name is manager
06/06/2024 10:22 PM - edited 06/07/2024 05:21 AM
Run query from data analyzer and validate. What is value whether its username or userkey accordingly update query
select u.userkey from request_access_attrs raa, request_access ra, Users u where u.userkey = raa.ATTRIBUTE_VALUE and raa.REQUEST_ACCESS_KEY = ra.REQUEST_ACCESSKEY and ra.REQUEST_ACCESSKEY = ${REQUESTACCESS.id} and raa.attribute_name = 'manager'
06/07/2024 01:54 AM
I was able to fix the issue @rushikeshvartak .
We have to user userkey instead of userame.
Adding updated query :
select u.userkey from request_access_attrs raa, request_access ra, Users u where u.userkey= raa.ATTRIBUTE_VALUE and raa.REQUEST_ACCESS_KEY = ra.REQUEST_ACCESSKEY and ra.REQUEST_ACCESSKEY = ${REQUESTACCESS.id} and raa.attribute_name = 'manager'
06/07/2024 05:21 AM
Good base query worked and you got way forward
06/07/2024 05:28 AM
@rushikeshvartak there is few more issue as we see.
In my form there are more than 7-8 attributes apart from manager which can be updated.
Now the probelm is when any other atrribute is modified apart from manager the request goes for admin approval.
Can you assist how to handle?
06/07/2024 05:30 AM
Use union and get values from users table when manager attributes not exists in request access table
06/07/2024 05:32 AM
any sample that can be referred?
06/07/2024 05:37 AM
select u.userkey from request_access_attrs raa, request_access ra, Users u where u.userkey= raa.ATTRIBUTE_VALUE and raa.REQUEST_ACCESS_KEY = ra.REQUEST_ACCESSKEY and ra.REQUEST_ACCESSKEY = ${REQUESTACCESS.id} and raa.attribute_name = 'manager' union select userkey from users where userkey=${manager}