05/16/2023 06:45 AM
05/16/2023 01:06 PM
It seems to be syntax issue. Can you try below?
"description": "${if(user.customproperty7.equals('On Leave')){'value'+' '+user?.customproperty12} else {'value'+' '+user?.employeeid}}"
Thanks
05/18/2023 09:56 AM
Hi @dgandhi
Thanks for your response.
Our requirement is to combine multiple attribute values and need to send to AD account description and also with else condition. Refer below.
"description": "${if(user.customproperty7.equals ('On Leave')){'user.customproperty12''user.employeeid''user.customproperty7'} else if(user?.customproperty12.equals('Active')) {'user.customproperty12''user.employeeid'}} ",
Regards,
Rajesh
05/18/2023 05:00 PM
You can use the below format to setup the description value when CP7 is On Leave.
I am checking on how to trim the value we added once user is no longer On Leave and will update you.
"description": "${if(user?.customproperty7.equals('On Leave')){String str = user.customproperty12;return str.concat('** LOA').concat(Calendar.getInstance().getTime().format('yyyyMMddHHmmss')).concat('Saviynt');} else {user.customproperty12}}"
05/19/2023 05:04 AM
Hi @sahil
Thanks for your reply.
The requirement is the below. I can pass single attribute value but when start combine mor ethan one then its passing the attribute keys (cp12, cp13) instead of the value.
The requirement is as below.
"description": "${if(user?.customproperty12.equals('On leave')) ${user.customproperty12} ${user.employeeid} ** ${user.customproperty7} ${user.customproperty13} Saviynt else if(user?.customproperty12.equals('Active')) ${user.customproperty12} ${user.employeeid}}
Regards,
Rajesh
05/19/2023 05:15 AM
You can use concat string function
05/19/2023 07:08 AM
Thanks you all issue resolved with some customizations.
05/19/2023 07:59 AM
Can you share the final format you used which solved the issue.