Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/23/2024 11:07 PM
Hello all,
I need to check a condition in the JSON to mention the Ticket Subject. The condition is, if 'entitlement_valueKey!==null' then 'CERT -Remove Access'.
But in the log viewer, it is throwing the error as "Error in createNewServiceTicketcom.fasterxml.jackson.core.JsonParseException: Unrecognized token '$': was expecting ('true', 'false' or 'null')|"
When I remove the "!" in the JSON and pass it as "entitlement_valueKey==null", then it is creating the ticket in Freshservice.
Is there any other syntax to check the IS NOT NULL condition.
Thanks & Regards.
Saviynt_Savvy
06/24/2024 01:07 AM
Hi @Saviynt_Savvy ,
It should be != instead of !==
If this helps, please consider selecting Accept As Solution and hit Kudos
06/24/2024 03:44 AM
@Saviynt_Savvy try below
${if (task.entitlement_valuekey.entitlement_value!='' and task.entitlement_valuekey.entitlement_value!= null ) {'CERT -Remove Access'} else if(task.entitlement_valueKey.entitlement_value=='Belgium'){'[BE-140]'} else {''} }
06/24/2024 09:01 PM
Instead of it always use string functions
'entitlement_valueKey.equalsIgnoreCase('AA')
06/25/2024 01:09 AM - edited 06/25/2024 01:11 AM
06/25/2024 09:27 PM
Try != null and !=''