I've had a look around online and in the forum and not found quite what I was looking for.
I'm using a SharePoint list as my data source to populate a gallery. I've created a collection to populate a dropdown box like this:
So far so good. I have a collection with the first item being "<Unassigned>" and the rest of the fruit below that.
What I'd like to do is be able to filter my gallery specifically on "<Unassigned>", and to return only those records where the fruit type is blank.
I've tried my code like this:
Filter(Sales, Or( IsBlank(ComboBoxFruit.SelectedItems), IsEmpty(ComboBoxFruit.SelectedItems), fruitType = Substitute(Last(FirstN(ComboBoxFruit.SelectedItems,1)).Value,"Unassigned>",Blank() ) )
I was hoping PowerApps could do the simple substitute for a Blank() result and compare that against the SP list but no luck.
When I test like this:
Filter(Sales,fruitType = Blank())
... it works just fine.
Thank you in advance,
Thanks for the suggestion, but my items property on the gallery is already very complex based on several if conditions. This has arisen from the simple fact I can't use a variable from within the app in my SortByColumns function without hitting delegation.
If I were to use your solution I'd have to create a whole new set of If conditions to sort my data.
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!