I have two SQL 'one to many' linked tables.
Table 1 is "Teams." The primary key is "ID", an integer.
Table 2 is "Members." The one-to-many join field is "EntityID," also an integer.
I have a ComboBox that helps to look up a particular "Team." A FormViewer on the Screen shows various details for the "Team." For testing, I have included a datacard (DataCard25) showing the "Team" ID.
I want the Screen to show "Members" (in a table format) that are associated with the selected Team.
I have tried a couple of different approaches, using both a 'DataTable' and using a 'Gallery', to display the filtered data. I've attempted a number of filtering formulas. I receive notices that my formula is incorrect or delegation warnings...
Filter('[dbo].[Members SubTable]', DataCardValue25.Text in Text(EntityID)) --Delegation
Filter('[dbo].[Members SubTable]', DataCardValue25 = EntityID) --Delegation
Filter('[dbo].[Members SubTable]', EntityID = DataCardValue25) --Invalid Argument
The only way I have been able to filter the table is to hard code the filter; i.e.,
Filter('[dbo].[Members SubTable]', EntityID = 1731), where '1731' is an actual "ID" from the [dbo].
[Teams] table. (This works for both the datatable and gallary methods.)
Any insight would be greatly appreciated.