Some help much appreciated!
I have a gallery with the contents of an SQL table (List of Vehicles with a primary key of FleetID).
In the gallery I have a checkbox which adds the FleetID to a collection called SelectedVehicles_Test when checked and removes it when unchecked.
Outside the gallery I have a check box which when selected is supposed to filter the gallery to only those vehicles selected with the checkbox ("Show Only Selected")
In the Items row of the gallery I set them with an If statement which works fine however I cannot seem to get the table to filter to show any of the items which are in the collection.
Filter('[dbo].[Vehicle]',FleetID = First(SelectedVehicles_Test).FleetID)
I have numerous delegation problems with the filter as written, which I'm sure I will have to deal with at some point, I'm just mystified why it can't filter the table based on *any* value in the collection (hence the First filter on the collection)
I can see that SelectedVehicles_Test.FleetID is returning a number type which is the same type as the FleetID in the Vehicle table.
If I replace the First(SelectedVehicles_Test).FleetID) with a hardcoded value it's fine and if I put the First(SelectedVehicles_Test).FleetID as a Text identifier in a label it returns the FleetID of the first record of the collection.
Is there a way to do this, and preferably if someone could suggest a method which removes the delegation issue I'd be really grateful!!