Hello,
I'm trying to set a default value for the combo box. I have
in Items: Sort(Distinct('dbo.Travel',RequestedYear),Result,Descending)
And in Default Selected Items : Filter('dbo.Travel',RequestedYear = "2021")
And it does not filter the gallery based on the default value.
What am I missing here?
Thanks,
Omi
Solved! Go to Solution.
The schema and values of the DefaultSelectedItems (DSI) need to be exactly the same as the Items property.
You are using the Distinct function in the Items property - so this will return a table with a single column called Result.
Your DSI is providing a full record of 'dbo.Travel' - This will NOT match the items.
So, if you need no other column in your combobox, then set your DSI to:
ForAll(Filter('dbo.Travel', RequesstYear="2021"), {Result: RequestedYear})
I hope this is helpful for you.
The schema and values of the DefaultSelectedItems (DSI) need to be exactly the same as the Items property.
You are using the Distinct function in the Items property - so this will return a table with a single column called Result.
Your DSI is providing a full record of 'dbo.Travel' - This will NOT match the items.
So, if you need no other column in your combobox, then set your DSI to:
ForAll(Filter('dbo.Travel', RequesstYear="2021"), {Result: RequestedYear})
I hope this is helpful for you.