I've built a custom connector that returns an object with three layers of nested arrays (see the example below).
When defining the connector's response using 'import from sample', it doesn't show any of the fields in the third nested array ('issues') in the UI. However, it does show up in Swagger editor, which confirms that it has been captured.
When looping through the arrays in Flow, I'm able to get to the point of looping through the 'issues' array, but I can't access any of the fields in the child objects.
Any thoughts as to why? Is there a limit to how deep custom connectors will look into nested arrays? Is there another way to access the children of a custom connector, besides using 'Apply to each' on each nested array?
Response Sample:
{
"id": "1a797e87-9bfc-4ff0-8a50-7a81a81bda19",
"project_id": "0e02977b-4c7d-47f3-85ac-581a6810cfca",
"created_at": "2019-10-30 11:36:30 -0400",
"sections": [
{
"section_name": "",
"items": [
{
"id": "beb90fbd-e431-45fb-a9ab-21f77708d29c",
"created_at": "2019-10-30 11:37:47 -0400",
"issues": [
{
"id": "f8c5d8d6-8192-45a4-acf4-e847d8d8da98",
"description": "The building is finished ",
"identifier": "000006"
}
]
}
]
}
]
}
What this produces in Swagger Editor:
responses:
'200':
description: success
schema:
type: object
properties:
id: {type: string, description: id}
project_id: {type: string, description: project_id}
created_at: {type: string, description: created_at}
sections:
type: array
items:
type: object
properties:
section_name: {type: string, description: section_name}
items:
type: array
items:
type: object
properties:
id: {type: string, description: id}
created_at: {type: string, description: created_at}
issues:
type: array
items:
type: object
properties:
id: {type: string, description: id}
description: {type: string, description: description}
identifier: {type: string, description: identifier}
description: issues
description: items
description: sections
What this produces in the UI:
same problem. I suppose I could make a work around by calling the items through an OnChange, parse the body, and make collections with the response in my powerapp.
Hi @adsk_dc,
The template language expression cannot be evaluated because property 'sections' cannot be selected. Array elements can only be selected using an integer index. So the only way to extract the level 3 child element of the nested array, you need to use Apply to each.
Or you can remove these "[]" in the array, and then parse JSON for it.
[
{
"id": "1a797e87-9bfc-4ff0-8a50-7a81a81bda19",
"project_id": "0e02977b-4c7d-47f3-85ac-581a6810cfca",
"created_at": "2019-10-30 11:36:30 -0400",
"sections":
{
"section_name": "",
"items":
{
"id": "beb90fbd-e431-45fb-a9ab-21f77708d29c",
"created_at": "2019-10-30 11:37:47 -0400",
"issues":
{
"id": "f8c5d8d6-8192-45a4-acf4-e847d8d8da98",
"description": "The building is finished ",
"identifier": "000006"
}
}
}
}
]
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.