Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/27/2023 12:35 AM
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.
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:
This request should have stored form selection value as "Contractor Offboarding and Extension" so that it get populated in user customproperty22.
Regards,
Hitesh Sapkota
07/27/2023 01:42 AM
Hi @h_sapkota ,
Can you provide full screenshot of the dyanmic attribute.
07/27/2023 08:22 AM
Hi @pmahalle ,
Below are the screenshots:
Action String: SHOW###MANStart###Mandatory 10-Day Leave___SHOW###MANEnd###Mandatory 10-Day Leave___SHOW###note3###Mandatory 10-Day Leave___SHOW###note4###Mandatory 10-Day Leave___SHOW###note5###Mandatory 10-Day Leave___HIDE###note6###Mandatory 10-Day Leave___SHOW###note6###Contractor Offboarding and Extension___HIDE###MANStart###Contractor Offboarding and Extension___HIDE###note3###Contractor Offboarding and Extension___HIDE###note4###Contractor Offboarding and Extension___HIDE###note5###Contractor Offboarding and Extension___HIDE###MANEnd###Contractor Offboarding and Extension___SHOW###extendDate###Contractor Offboarding and Extension___HIDE###extendDate###Mandatory 10-Day Leave___HIDE###MANStart###N/A___HIDE###MANEnd###N/A___HIDE###extendDate###N/A___HIDE###note3###N/A___HIDE###note4###N/A___HIDE###note5###N/A___HIDE###note6###N/A
Regards,
Hitesh
07/27/2023 02:19 AM
Do you have workflow attached for User modification in Global config?
Are you getting dates from the sql query?
Share complete DA to verify
07/27/2023 08:23 AM
Yes, we have workflow attached.
We are getting the dates values from Date Picker.
The complete DA is provided above.
Here, Date part is secondary . The main part is the value for the Form Selection which is not showing the default value when it is kept non editable.