I know I can create popup elements with arcade by using the popupElement item.
For example, I can recreate "tables" in a popup with arcade by using the "fields" type.
I'm trying to recreate the related records item so I can customise it further than the web map interface lets me.
However, I can't get it to work with the "relationship" type. To make sure I had it set up correctly, I added a related records item with the web map tools, downloaded the map json definition, and I was using exactly the same info. However, I can't get a related records item in a popup generated by arcade: nothing shows up in the rendered popup.
Here is the downloaded json relevant part (sorry for the weird formatting):
"popupInfo": {
"popupElements": [
// first popup: created with the web map interface tool
{
"type": "relationship",
"description": "",
"displayCount": 3,
"displayType": "list",
"orderByFields": [
{
"field": "category_id",
"order": "asc"
}
],
"relationshipId": 3,
"title": "related gui"
},
// second popup: tried to create with arcade, doesn't work, nothing shows up in popup
{
"type": "expression",
"expressionInfo": {
"title": "test arcade relation",
"expression": "return { "description": "desc",
"displayCount": 3,
"displayType": "list",
"title": "related arcade",
"orderByFields": [ {
"field": "category_id",
"order": "desc"
} ],
"relationshipId": 3,
"type": "relationship"};",
"returnType": "dictionary"
}
}
]
}
Anybody has a working example?
Thanks.