Hi,
I am following the example in this video to retrieve data from a secondary table.
I have 2 tables Retailers and Locations with a 1:N relationship pointing from Retailers to Locations.
I am displaying the name field in a button from Retailers and using this to run the relationship search and in the Locations I am trying to get data in the location field and display it as a list in a repeater block.
I have run the query in REST console and it works -
https://l…/api/data/retailers?where=%60name%60%20%3D%20’SOLAR’&loadRelations=locations
and the returned data looks like this -
[
{
"retailercat": 2,
"created": 1737591408000,
"name": "SOLAR",
"___class": "retailers",
"locations": [
{
"created": 1737590701000,
"___class": "locations",
"location": "Jackman City",
"ownerId": null,
"updated": null,
"objectId": "29AAE884-D3D9-4D32-A19D-80A9B03510FA",
"locid": 141
},
{
"created": 1737590701000,
"___class": "locations",
"location": "Banyard",
"ownerId": null,
"updated": null,
"objectId": "3E017F52-CE04-4ABF-BE58-623DA0F9D379",
"locid": 137
},
{
"created": 1737590701000,
"___class": "locations",
"location": "Swindon",
"ownerId": null,
"updated": null,
"objectId": "400C64CA-4172-4A45-AE88-124D414C4132",
"locid": 86
},
],
"ownerId": null,
"retailerid": 6,
"updated": 1737655143327,
"objectId": "67FE2B4D-73A4-44B7-8F06-F9519F465042"
}
]
I have the Text block content set to locations.location but when I run the preview nothing happens.
In the console screen, I am verifying that the query is correct - name=‘SOLAR’.
Would appreciate any assistance and also, what would be the correct terminator for the in list block to retrieve all of the records rather than first, last, etc.?
Thanks
Steve