When a Gallery is nested within a Gallery, there are some syntax specifics to note.
The nested gallery will have a ThisItem context, which represents the row for the nested table.
- Used like an other gallery, to access the contextual Row and its field values
HOWEVER, the Items property (and maybe others), has a different Context for ThisItem
- Here, ThisItem refers to the top gallery row, which the nest gallery is...well, nested
- This means you can access the parent gallery row to
- Use it for filtering
- Use a table attribute (like a child relationship) as the source of records
In a default CDS instance, for example
- Create a canvas app
- Add a Gallery, Items = Accounts
- Add a nested Gallery, Items = ThisItem.Accounts
The nested gallery above will be populated with the child records (via Parent Account relationship), of the Account in that row.
For yours, you may have to configure the nested gallery with a different data source, but you can at least apply a filter such as
- Filter(Table, Workstation = ThisItem.Workstation)