I'm trying to display items in a gallery, but filter by a column that is text. Example below:
Item Number
Item Title
Item Description
Item Health
I want to ONLY show the items with Item Health = to "1 Red" or "2 Yellow" or "3 Green"....
This is for a sort of "dashboard" app. The data source is a list view. I can see all the values, I just can't get the initial filter to work right. Ideas?
Hi,
Thanks for taking the time to help.
Please I am using similar code but I am having problem searching on the mobile or when using the link to test.
This is my code:
SortByColumns(Filter('PowerApps BOW',StartsWith(Title,TextSearchBox1.Text)),"Title", If(SortDescending1, Descending, Ascending))
When I test the search from the https://create.powerapps.com/studio/#
The search works fine, but no so when I test is with mobile or using the link, also other users can not search from their devices.
Please can you help?
Thank you.
Current:
SortByColumns( Filter(MyList, StartsWith(Title, TextSearchBox1.Text) ), "Title", If(SortDescending1, Descending, Ascending) )
If you want to add more conditions, you would place it in this red spot:
SortByColumns( Filter(MyList, StartsWith(Title, TextSearchBox1.Text) && column=value ), "Title", If(SortDescending1, Descending, Ascending) )
You could use && to mean "and" or you can use a comma in the Filter formula:
SortByColumns( Filter(MyList, StartsWith(Title, TextSearchBox1.Text), column=value ), "Title", If(SortDescending1, Descending, Ascending) )
Repeat that for as many conditions as you want.
Let me know how it goes.
I tried this and cannot get it to work either way. I have tried just about everything to get this to sort by the correct column, and cannot get it to work. It will only sort by the default formula:
SortByColumns(Filter(MyList, StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
Where in the above statement would I put more filter criteria? This statement provides the entire list, and you can search by "Title" in a search bar at the top. I get all that....what I do NOT get, is how to add in more filter criteria.
Hi
I am sorry im not very good at understanding things, but
If you select Gallery on the left (1), then choose property Items (2) there is a value (3).
Its is like "NameOfDataSource" (For my case it is SharePoint Online list called "PosunutyCas1")
If I set only "PosunutyCas1 it get all items by default".
With Filter function I try to filter this list to only items which column ID=1 or ID=1 (sorry but its nonsense the same value)
But in your case maybe Filter(MyList1;Health="1 Red" || Health="2 Yellow" || "3 Green")
(I have not english language, so formula separators etc syntax may be different, in english documentation and example:
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/
But i will try first like Filter(MyList1,Health="1 Red")