and more in a single search tool across platforms. Read the announcement here. |
03/20/2024 11:14 AM
Hi Team,
I have to map the response from one call to another in Addaccess json for one of the entitlementtype.
I have space in entitlement type "Group Unit". I made 2 calls listed below but while passing the response from first to second it is not working as it contains space in between.
Please provide how i can user in another call.
{
"name": "Group Unit",
"connection": "acctAuth",
"url": "url",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
{
"name": "Group Unit",
"connection": "acctAuth",
"url": "url",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"id\":\"${account.accountID}\",\"userName\":\"${account.name.replace('\\\\','\\\\\\\\')}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\":\"${user.email}\",\"isLocalAdministrator\":\"${response.Group Unit1.message.isLocalAdministrator}\",\"isActive\":\"${response.Group Unit1.message.isActive}\",\"credentialSourceId\":\"${response.GroupUnit1.message.credentialSourceId}\",\"opuIds\":[\"${List opu= response.Group Unit1.message.opuIds; opu.add(entitlementValue.entitlementID); return opu.toString().replace('[','').replace(']','').replace(',','\",\"');}\"], \"facilityId\":[\"${List loc= response.Group Unit1.message.locationIds; return loc.toString().replace('[','').replace(']','').replace(',','\",\"');}\"],\"userRoles\":[\"${List role= response.Group Unit1.message.listUserRoleIds; return role.toString().replace('[','').replace(']','').replace(',','\",\"');}\"]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
}
03/20/2024 02:25 PM - edited 03/20/2024 02:28 PM
How about using something like this
${response.'Group Unit'.message.isLocalAdministrator}
Or may be trying to escape the space with \\
03/20/2024 10:02 PM
Do you see any error in logs
03/20/2024 10:43 PM
It is not getting loaded. The values are not getting populated and showing the same things as string
03/20/2024 10:49 PM
Can you elaborate more / Provide screenshot
03/20/2024 11:41 PM
If it has spaces the call itself is not getting picked up No of calls:0.
If i removed the spaces call is getting picked up no of calls:2 (Error is value are not picked up)
If i go with Group\\ Unit1. same call is not getting picked up and showing 0 calls.
03/21/2024 12:15 AM
It is working with response.'Group Unit1'.message.isLocalAdministrator