Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/18/2024 09:54 PM
Hi guys,
I'm testing about parsing specific value from User's customproperty using Multivalue as below.
Is there any suggestion CreateAccountJSON for below case?
Scenario
1. User has multi-valued customproperty -> User.customproperty29 (Value = 'A:B:C:D')
* If B is Empty for some users, value will be 'A::C:D'
2. Endpoint is integrated with REST and need 4 values for Create Account as below
- Arg1 : A
- Arg2 : B
- Arg3 : C
- Arg4 : D
3. on above case, i want to write createAccountJSON but failed
Thank you.
10/18/2024 10:56 PM - edited 10/18/2024 10:57 PM
@moosam2 try this
\"Arg1\": \"${(user.customproperty29.split(':')[0]=='')?'': user.customproperty29.split(':')[0]}\"
Create similarly for others.
10/19/2024 08:11 AM - edited 10/19/2024 08:12 AM
{
"Arg1": "${user?.customproperty29?.substring(0, user?.customproperty29?.indexOf(':')) ?: ''}",
"Arg2": "${user?.customproperty29?.substring(user?.customproperty29?.indexOf(':') + 1, user?.customproperty29?.indexOf(':', user?.customproperty29?.indexOf(':') + 1)) ?: ''}",
"Arg3": "${user?.customproperty29?.substring(user?.customproperty29?.indexOf(':', user?.customproperty29?.indexOf(':') + 1) + 1, user?.customproperty29?.lastIndexOf(':')) ?: ''}",
"Arg4": "${user?.customproperty29?.substring(user?.customproperty29?.lastIndexOf(':') + 1) ?: ''}"
}