Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/16/2024 09:20 AM
We have a requirement wherein we want to update an attribute of the connected endpoint with pre-"@" symbol of the email ID.
I tried with below syntaxes, nothing worked. Can you please suggest a right way to use substringBefore function in connection JSON.
This works:
\"Username\": \"${user?.email}\"
None of these work:
a. \"Username\": \"${substringBefore(user?.email, '@')}\"
b. \"Username\": \"${substringBefore(user?.email, \'@\')}\"
c. \"Username\": \"${substringBefore(user?.email, "@")}\"
d. \"Username\": \"${substringBefore(user?.email, \"@\")}\"
e. \"Username\": \"${substringBefore(user?.email, @)}\"
f. \"Username\": \"${split(user?.email, "@", 1)}\"
g. \"Username\": \"${split(user?.email, "@")[0]}\"
Solved! Go to Solution.
04/16/2024 10:30 AM
Sample can you provide result what expecting , before '@' means we have system user right use , based on that email will generate .
\"Username\": \"${user?.systemusername}\"
04/16/2024 08:20 PM
user?.email.substring(0, user?.email.indexOf('@'))
04/16/2024 08:45 PM
Thank you @rushikeshvartak, it worked!
04/16/2024 08:47 PM
FYI it should be java functions and not String functions