Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 01:13 PM
Dear Team,
I have the following in my CreateTicketJson:
...."httpParams": "{\"CreatedBy\":\"reqAttrs.name\",\"Source\": \"Email\", \"RecID\": \"if(reqAttrs.heat_requestor.isEmpty() || reqAttrs.heat_requestor=='' || reqAttrs.heat_requestor==null){$requestor}else{reqAttrs.heat_requestor}\",....
I want to check if attribute a is empty and if true then select $requestor else I want to insert the attribute a for RecID.
Is there a way on hwo to do that?
Thanks
Best Regards
Faizal
Solved! Go to Solution.
04/12/2022 02:37 PM
Faizal,
If you are using dynamic attributes, can you set a default value for it so that you can check against and then process your logic. Might be simpler that way.
Regards,
Avinash Chhetri
04/12/2022 02:37 PM
Hi Avinash,
thanks for the reply, I got it solved.
Best
Faizal
04/12/2022 02:37 PM
Thanks Faizal, appreciate if you could post your solution on the forum so that others can also utilize it and mark this post as answered.
Regards,
Avinash Chhetri
04/12/2022 02:37 PM
I just had a really basic syntax error.
below is the right way on how to write it starting from the RecID:
RecID\":\"${if(reqAttrs.heat_requestor.isEmpty() || reqAttrs.heat_requestor=='' || reqAttrs.heat_requestor==null){$requestor}else{reqAttrs.heat_requestor}}\",
Best Regards,
Faizal