11-17-2022 05:31 AM
HI Team,
I am referring the dynamic attribute in the Grant access JSON and it is working as expected.
But when I am referring the same in update account JSON it is getting failed.
Expression I am using.
Dynamic attribute name: Role
Grant access Json:
{
"Client" : [
"EXEC Usp_add_user_role @I_LAN_ID = '${task.accountName}', @I_Lifecycle = 'DEV', @I_Role_ID = '${String rl;rl=Role;rl=rl.substring(rl.indexOf(\'_\')+1);if(rl != null){return rl}}', @I_Perform_By = 'Saviynt'"
]
}
Update Account JSON:
{"UpdateAccountQry":["EXEC Usp_add_user_role @I_LAN_ID = '${task.accountName}', @I_Lifecycle = 'DEV', @I_Role_ID ='${String rl;rl=Role;rl=rl.substring(rl.indexOf(\'_\')+1);if(rl != null){return rl}}', @I_Perform_By = 'Saviynt'"]}
FYI, I am storing the dynamic attribute in account cp5. So, I tried getting the value from it as well but it is also getting failed
Please let me know if you have any suggestions.
Thanks & Regards,
Avinash Repalle
11-18-2022 10:49 AM - edited 11-18-2022 10:49 AM
Can you higlight DA in updateaccountjson
try ${Role}
Hope you are storing dynamic attribute value in accounts column
12-07-2022 10:00 AM
${Role}: is returning value.
But my ${Role} will return something like access_125 then I need 125 in the update account JSON.
Issue: if I am using string functions along with ${Role} it is not working as expected
12-07-2022 12:57 PM - edited 01-01-2023 10:27 PM
${Role}.split('_')[0]
12-30-2022 10:52 PM
Hi,
Is this confirmed working in 2021.x? Whenever I try to split in addaccessjson it shows syntax error while trying to save endpoint
12-31-2022 04:31 AM
Use. Substring
01-01-2023 10:09 PM
I figured out what was wrong. In ${Role}.split("_")[0]. Instead of "_" need to user single quotes. Like '_'.