Handlebars expression issue
While looking up for data in Azure AD, When i try to have a $filter condition of:
employeeId eq '{{{data.workAssignments[0].reportsTo[0].associateOID}}}'
for some reason I get the error:
[
{
"code": "handlebars_template_parse_error",
"message": "Failed to generate request url from template: https://graph.microsoft.com/v1.0/users?$select=employeeId&$filter=employeeId eq '{{{data.workAssignments[0].reportsTo[0].associateOID}}}'. Details: Parse error on line 1:\n...loyeeId eq '{{{data.workAssignments[0].r\n-----------------------^\nExpecting 'ID', got 'INVALID'.",
"occurredAt": 1689790979904,
"resolved": false,
"source": "resource"
}
]
However, a similar construct in the Celigo published template works fine !!
Comments
Vreddhi Bhat going to need some screenshots of your setup, where the handlebar expressions are being used, and what the input data looks like.
If I was a betting man, "data" is most likely an array of data and therefore probably requires you to use {{{data[0].workAssignments[0].reportsTo[0].associateOID}}}. However, doing so may have other implications because you then may just be using the first record in the page instead of each record in the page. It would be better to switch to AFE 2.0 on the handlebar editor as it's a bit easier to use. Also, I'm not sure is associateOID is a real field or if you meant to put associate[0].ID.
Here is the screenshot of mock input data, and the launch parameters:
Vreddhi Bhat looks like you need dot notation:
If you flip your form view to HTTP, then you can use the handlebar editor to make building this easier.
Thank you. Yes, the dot notation worked. Meanwhile, i did a workaround by implementing a transformative function in the ADP export, to parse the data and add a ID field as a first key pulling it put of the nested data, and access it with {{{managerId}}} :)
Please sign in to leave a comment.