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

how to send all dynamic attribute in create ticket json?

thesvg
Regular Contributor
Regular Contributor

I have multiple dynamic attributes defined at the endpoint level, for multiple endpoints for which servicenow is our connection, I want to send all dynamic attribute defined at the endpoint level, regardless of the endpoint via create ticket json how do I do this? something like what 'allEntitlementsValue' does but for reqAttrs. 

 

ex: 

to be able to iterate through all values of the map and output 

"key1: value1 ; key2: value2", etc

5 REPLIES 5

Raghu
All-Star
All-Star

thesvg
Regular Contributor
Regular Contributor

thank you, I am looking to see if there is way to iterate through the list than hardcode it, as the number of dynamic attributes vary per application

@thesvg  try

requestAccessAttributes.get('abc').split(',').collect { it.trim() }


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

thesvg
Regular Contributor
Regular Contributor

we realized just ${requestAccessAttributes} or {reqAttrs} does exactly that. 

flegare
Regular Contributor III
Regular Contributor III

Here is a way to filter out some of the values that are automatically added by Saviynt without being defined in the form:

 

${String v = ''; requestAccessAttributes.each{(it.key != 'REQUESTORIGIN' && it.key != 'ACCOUNTNAME' && it.key != 'ENDPOINT') ? v+=it.key + ': ' + it.value + '; ' : ''}; return v;}