Thursday
Scenario is like -
Input array : [name, error: [code: "test", detail : "missing test"]]
So im currently querying like Input array.format_map('Name : %{name}, Error Detail : %{"what should be the query here to get detail field from error list in input array"}').
Solved! Go to Solution.
Friday - last edited Friday
I got the solution for the problem , we just need to extract both the field in array format then use format_map %s notation to fetch the value from nested array.
You can check out the documentation as well herehttps://docs.workato.com/en/formulas/array-list-formulas.html#format-map
Thursday
Your input array looks incorrectly formatted. Can you provide an actual example, something that is correctly formatted?
Thursday
Below is the exact data for reference @gary1
"results": [
{
"external_id": "xyz",
"index": 0,
"errors": [
{
"code": "CustomObjectRecordCreateOrUpdateByExternalIdFailed",
"title": "Record validation errors",
"detail": "Name cannot be blank"
}
],
"status": "Failed"
}
]So i need to use format_map on result array and pluck detail field from errors list.
Friday
Hi @amaan ,
Here is one of the solution,
Please let me know if you have any question.
Thanks and Regards,
Shivakumara K A
Friday - last edited Friday
Hi @shivakumara , thanks for the input but this approach does not solve the requirement i want each object to aligned with proper external id along with its error detail , the solution you posted will give first object detail of errors list only and that too at the end, not along the external ids.