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

Get all requested Entitlement displayNames in Createticketjson

ShyamSrisailam
Regular Contributor
Regular Contributor

Hi All,

We have a ticket-based application where we are printing all the required details in the ticket but when user requested the application and entitlements through ARS, we also need to print the requested entitlement displayNames.

Please let us know if anyone have the syntax to print the displaynames of the requested entitlements in CreateTicketJSON.

FYI, I need to get all the requested entitlement displaynames in CreateTicketJSON.

 

 

Regards
SrisailamShyamSundarGoud
5 REPLIES 5

SumathiSomala
All-Star
All-Star

@ShyamSrisailam Could you please the below article for more information

You can use ${allEntitlementsValues} binding variable.

Solved: How to iterate / pretty print the allEntitlementsV... - Saviynt Forums - 3008

 

Let me know if it helps.

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

ShyamSrisailam
Regular Contributor
Regular Contributor

Hi @SumathiSomala,

We have tried the below syntax in the JSON, but it is printing the entitlement value, but we need to print the displayname of the entitlement. 

${allEntitlementsValues.replace(':: ADD : ','').replace('\n','').replace('[','').replace(']','').replace('(','').replace(')','')}

Let me know if we you have the syntax to print entitlements displayname.

I've tried below things but didn't work.

${allEntitlementsValues.displayname}

${allEntitlements.displayname}

${entitlementValue.displayname}

 

 

Regards
SrisailamShyamSundarGoud

@ShyamSrisailam  allEntitlementsValues: It binds all the entitlement values separated by colon.

I don't think it will display the displayname of the entitlements

Please refer the below document for supported binding variables.

Developers Handbook (saviyntcloud.com)

ServiceNow as a Ticketing System (saviyntcloud.com)

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

ShyamSrisailam
Regular Contributor
Regular Contributor

Hi @SumathiSomala ,

I checked both documentations which you provided I didn't find anything which prints entitlement displayname.

In both doc I do find the binding variable of ${allEntitlementsValues} and I see as below

Attributes exposed per binding object

allEntitlementsValues: It binds all the entitlement values separated by colon(:) which are requested by requestor. For example, group1 : group2 : role1.

If it is not present in documentation, then it means we can't pull entitlement displayname in CreateTicketJSON ?

 

Regards
SrisailamShyamSundarGoud

@ShyamSrisailam : I doubt you should be able to retrieve displayname. But can you give it a try with below

${def res = ''; allEntitlementsValues.replaceAll(\"\\n\",\" \").replaceAll(\":: Group :\",\" :\")?.eachWithIndex{ num, idx -> res = res + com.saviynt.ecm.identitywarehouse.domain.Entitlement_values.findAll(num)?.displayname+ ',';}; return res;}

Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.