Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Entitlement check in the pending task for Ticket Creation

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hi all,

I am creating a Freshservice ticket with some user details in the description.
I am also passing some string values in the ticket description like 'Name', 'Enddate' using them as sub-headings as shown below.

Saviynt_Savvy_0-1714986210107.png
Now, I want to pass the string 'Requested Entitlements' based on a condition, where only if the task has entitlements associated with it or not. 
I have tried the below combinations to pass the string based on checking the 'allEntitlementsvalue' and 'entitlement_valueKey' but it's not even creating the ticket itself.

Condition Checks:

${(allEntitlementsValues!==null || allEntitlementsValues.isNotEmpty() || allEntitlementsValues!=='') ? 'Requested Entitlements':'')}

$(task.entitlement_valueKey!==null || task.entitlement_valueKey!=='' || task.entitlement_valueKey.isNotEmpty) ? 'Requested Entitlements':''}

Let me know what values should I use in condition checking to pass the 'Requested Entitlements' string only in case of the task has any entitlements in it.

Thanks & Regards,
Saviynt Savvy

2 REPLIES 2

Raghu
Honored Contributor
Honored Contributor

@Saviynt_Savvy  try below

${(allEntitlementsValues!=null || allEntitlementsValues!='') ? 'Requested Entitlements':'')}

or

${(task.entitlement_valueKey.entitlement_value!=null || task.entitlement_valueKey.entitlement_value!='')? 'Requested Entitlements':''}


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

rushikeshvartak
All-Star
All-Star

${(allEntitlementsValues != null && allEntitlementsValues.isNotEmpty()) ? 'Requested Entitlements' : ''}


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