Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
04/15/2024 04:40 AM
Hi Team,
I want to modify the entiltlement_value string to create the displayname during import job. It would be something like this:
entitlement_value = "ABC_XYZ_View_Group" ----> displayname = "ABC XYZ"
Is there any way I can modify the ImportAccEntJSON to do this? (regex, maybe?)
Here is the entitlement snippet of the JSON.
"entitlementParams": {
"processingType": "SequentialAndIterative",
"connection": "userAuth",
"entTypes": {
"siteRole": {
"entTypeOrder": 0
},
"group": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://dummyurl/groups",
"httpHeaders": {
"Authorization": "${credentials.token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups.group",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "pageSize",
"pageSize": 1000,
"pageNumberParam": "pageNumber",
"totalCountPath": "completeResponseMap.pagination.totalAvailable"
}
},
"disableDeletedEntitlements": true
}
}
}
}
},
Solved! Go to Solution.
04/15/2024 09:22 AM
@fuko : Can you try below JSON
"entitlementParams": {
"processingType": "SequentialAndIterative",
"connection": "userAuth",
"entTypes": {
"siteRole": {
"entTypeOrder": 0
},
"group": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://dummyurl/groups",
"httpHeaders": {
"Authorization": "${credentials.token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups.group",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"displayname": "#CONST#${String attr = name;String out= attr.replaceAll(\"_\",\" \"); return out}~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "pageSize",
"pageSize": 1000,
"pageNumberParam": "pageNumber",
"totalCountPath": "completeResponseMap.pagination.totalAvailable"
}
},
"disableDeletedEntitlements": true
}
}
}
}
}
04/15/2024 07:20 PM
"displayname": "#CONST#${String attr = name;String out= attr.substring(0, attr.indexOf("_View_Group")).replaceAll(\"_\",\" \"); return out}~#~char"
04/15/2024 07:54 PM
Hi @rushikeshvartak , @Saathvik
Instead of parsing the name the job seems to take the variable with code in it as a property.
I checked on both Entitlements UI and Data Analyzer
04/15/2024 08:01 PM - edited 04/15/2024 08:01 PM
It should work
https://forums.saviynt.com/t5/identity-governance/rest-string-functions/m-p/9161#M1562
For your use case try below
"displayname": "#CONST#${String data1 = response.name; String data2 = response.name..replaceAll(\"_\",\" \"); ret = data2; return ret}~#~char"
04/15/2024 09:56 PM
Thanks @rushikeshvartak , @Saathvik
The below JSON worked 👍. The text code will be use as property if there was error in code execution.
"entitlementParams": {
"processingType": "SequentialAndIterative",
"connection": "userAuth",
"entTypes": {
"siteRole": {
"entTypeOrder": 0
},
"group": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://dummyurl/groups",
"httpHeaders": {
"Authorization": "${credentials.token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups.group",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
"displayname": "#CONST#${String re = response.name; return re.replaceAll(\"View_Grp\",\"\").replaceAll(\"_\",\" \")}~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "pageSize",
"pageSize": 1000,
"pageNumberParam": "pageNumber",
"totalCountPath": "completeResponseMap.pagination.totalAvailable"
}
},
"disableDeletedEntitlements": true
}
}
}
}
},