Related Table Records - Select and Sort

I have an Equipment table with related child records in the Assignments table (one record in the Assignments table for each time a piece of equipment is deployed). I want to show related child Assignment records when viewing an equipment record, but it should only show the assignment records that are active.

I’ve tried this command in the Related Assignments virtual field created by Appsheet in the Equipment table.

SELECT(Active Assignments[Assignments ID], ( [Equipment]= [_THISROW].[Equipment]))

The “Active Assignments” is a slice of the Assignments table, but it doesn’t honor the criteria I’ve put in the slice (active records only). It still displays all records in the Assignments table. Any thoughts on how to filter the results?

Thanks, Wick

Is the name of your Equipment table’s Key field ‘Equipment’?

[Equipment]= [_THISROW].[THIS SHOULD BE YOUR EQUIPMENT ID FIELD]

However, if I understand you correctly, I think a simple way of doing this would be for you to go to the Related Assignments field on the Equipment Table (should be a list field) and changing its Referenced table name selection from the Assignments table to the Active Assignments slice.

1 Like

I had to work it for a bit but did get it to use the slice based on your advice. Thanks so much!