Posted 11 February 2020, 12:27 pm EST - Updated 30 September 2022, 6:39 am EST
Hi,
I am having some trouble adding an object that contains an array to a dataset, then using that dataset in a table.
My JSON data looks like this:
{
"Plants": [
{
"PlantCode": "abc123",
"Responses": [
{
"CL_Code": "aaaaa",
"CL_Description": "Test Checklist",
"ResponseId": 123,
"ResponseDate": "01/01/2020",
"Response": "no",
"StartTime": "5:15",
"WorkOrderNo": 456,
"Category": "Day Shift"
}
]
},
{
"PlantCode": "def456",
"Responses": [
{
"CL_Code": "bbbbb",
"CL_Description": "Test Checklist",
"ResponseId": 123,
"ResponseDate": "01/01/2020",
"Response": "no",
"StartTime": "5:15",
"WorkOrderNo": 456,
"Category": "Day Shift"
}
]
}
]
}
As you can see I have multiple plants, each with multiple responses. I am aiming to have a table that shows each plant code, then a table of that plants responses.
However, I’m unable to add the responses field in the dataset as an array of fields, and adding just the response fields (category, responseId, e.t.c) removes my ability to use the parent plantCode.