We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

User Enddate condition check

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hi,
In the below JSON snippet, I want to add one more condition along with the "task.type=14?" to check for the user endate.
If the user has enddate, then the enddate will be formatted as mentioned in the JSON.
But I want to add one more condition mentioning that if the user doesn't have any enddate, then the current date should be formatted.

JSON Snippet:
"httpParams":"{\"fields\": {\"project\":{\"key\":\"STP\"},\"summary\":\"${task.tasktype==3 ? 'New Hire : '+user.firstname+' '+user.lastname+'-'+user.startdate.format(\"MM/dd/yy\"): task.tasktype==14 ? 'Offboarding'+' '+user.firstname.toString().substring(0, 1).toUpperCase()+user.lastname.toString().substring(0, 1).toUpperCase()+' '+user.enddate.format(\"MM/dd/yy\"):''}\"}}".

Thank you,

1 REPLY 1

rushikeshvartak
All-Star
All-Star

"httpParams":"{\"fields\": {\"project\":{\"key\":\"STP\"},\"summary\":\"${task.tasktype==3 ? 'New Hire : '+user.firstname+' '+user.lastname+'-'+user.startdate.format(\"MM/dd/yy\"): (task.tasktype==14 && user?.enddate !=null) ? 'Offboarding'+' '+user.firstname.toString().substring(0, 1).toUpperCase()+user.lastname.toString().substring(0, 1).toUpperCase()+' '+user.enddate.format(\"MM/dd/yy\"):''}\"}}".


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.