Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Default value not populating in dynamic attribute

h_sapkota
Regular Contributor II
Regular Contributor II

Hi Team,

We are using Form Selection as dynamic attribute  of type Single select from SQL Query and passing the following query in values section as well as default value section.

1. Values: SELECT ATTRIBUTE3 as ID from dataset_values where datasetname = 'formValue' and ATTRIBUTE2 = (select CASE when s.ROLENAME = 'ROLE_POPULAR_HR' then 'HR' when s.ROLENAME = 'ROLE_POPULAR_MANAGER' then 'Manager' when s.ROLENAME = 'ROLE_POPULAR_SECURITY_ADMIN' then 'AdminSecurity' when s.ROLENAME = 'ROLE_ADMIN' then 'Admin' else 'User' END as ID from savroles s, user_savroles us, users u where s.ROLEKEY = us.ROLEKEY and u.USERKEY = us.USERKEY and u.userkey = ${requestor} order by ID asc limit 1) and ATTRIBUTE4 = (select CASE when u.employeeType = 'Employee' then 'Employee' when u.employeeType = 'Contractor' then 'Contractor' when u.employeeType = 'Agency Employee' then 'Agency Employee' else 'Contractor' END as employeeType from users u where u.userkey = ${requestee})

2. default values: SELECT ATTRIBUTE3 as ID from dataset_values where datasetname = 'formValue' and ATTRIBUTE2 = (select CASE when s.ROLENAME = 'ROLE_POPULAR_HR' then 'HR' when s.ROLENAME = 'ROLE_POPULAR_MANAGER' then 'Manager' when s.ROLENAME = 'ROLE_POPULAR_SECURITY_ADMIN' then 'AdminSecurity' when s.ROLENAME = 'ROLE_ADMIN' then 'Admin' else 'User' END as ID from savroles s, user_savroles us, users u where s.ROLEKEY = us.ROLEKEY and u.USERKEY = us.USERKEY and u.userkey = ${requestor} order by ID asc limit 1) and ATTRIBUTE4 = (select CASE when u.employeeType = 'Employee' then 'Employee' when u.employeeType = 'Contractor' then 'Contractor' when u.employeeType = 'Agency Employee' then 'Agency Employee' else 'Contractor' END as employeeType from users u where u.userkey = ${requestee})

Now, the Form Selection is non editable in Update User Request and should populate the default value as SQL Query only give one result. This dynamic attribute is stored in customproperty22 of the user attributes.

h_sapkota_0-1690443028544.png

This default value sometime populates sometime it doesn't. When it populates and we submit the request, we don't see the value passing in the modify user request and after approval the value doesn't populate in the user attribute.

Here, The form Selection value was shown as Contractor Offboarding and Extension by default for selected user and I passed the Expiry date. The modify request is shown as below:

h_sapkota_1-1690443172277.png

This request should have stored form selection value as "Contractor Offboarding and Extension" so that it get populated in user customproperty22.

Regards,
Hitesh Sapkota

 

Who Me Too'd this topic