Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Is Not Equal condition (!==null) is not working in JSON

Saviynt_Savvy
Regular Contributor
Regular Contributor

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

5 REPLIES 5

PremMahadikar
All-Star
All-Star

Hi @Saviynt_Savvy ,

It should be != instead of !==

 

If this helps, please consider selecting Accept As Solution and hit Kudos

Raghu
All-Star
All-Star

@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 {''} }


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

Instead of it always use string functions

'entitlement_valueKey.equalsIgnoreCase('AA')


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

yogesh2
Regular Contributor II
Regular Contributor II

  

Manu269
All-Star
All-Star

Try != null and !=''

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.