I don't see a similar question based on a quick search, so I'll ask a newbie question about PowerApps:

I have a SP Online list relating to incoming parts (raw materials) and I'm creating a new form for our Fork-truck drivers to use. The purpose of this form is to alert the drivers if the parts need to be inspected by our quality lab. Two of the fields in the list are Active and ItemNumber. I want to filter the parts to show only those parts (items) which are "active=yes" and then sort the resulting set based on the ItemNumber in ascending order.

Here's the curve: the form contains a text input where the driver begins typing in a part number, then the gallery dynamically displays the ItemNumber with this formula in the Text property: ThisItem.'RM-item-Number' I did this to condense the result set (as the driver types) so that they don't have to scroll through several hundred parts.

Input field

That works, however, there are situations (only a few, but they do exist) where there are multiple entries for an ItemNumber because we have multiple vendors supplying the material. I've found that when there are multiple vendors, the ItemNumbers aren't sorting properly (as shown below).

enter image description here

How do I filter and sort this correctly?



  • 1
    Please add the formula you're currently using to sort/filter.
    – Mike2500
    Dec 10, 2018 at 18:46
  • Mike2500: The only formula I am using is the ThisItem.'RM-item-Number' cited above. As the user types into the Text Input field, the gallery will display only the entries matching the text input. Most of the results are sorted correctly, but multiple-sourced items seem to "jump" out of order and shown in the lower image. At this point, I'm not sure how to sort/filter the gallery items... (this is my first app)
    – gpence
    Dec 10, 2018 at 19:44
  • the gallery itself should have the sorting/filtering set as part of the "items" property.
    – Mike2500
    Dec 10, 2018 at 19:50
  • Sorry, my Items property is set to: Search('Inbound RM Inspection',SearchBox.Text,"Title") (in this case, Title is the ItemNumber)
    – gpence
    Dec 10, 2018 at 19:52

1 Answer 1


I'm not sure why the items aren't sorting consistently, but a sort can be applied as part of the items property:

SortByColumns('Inbound RM Inspection', "Title")

Of course, this would sort, but wouldn't filter, so you'll need to nest the functions:

  Search('Inbound RM Inspection', SearchBox.Text, "Title"),

The above will search for the matching items, and then pass the result to the SortByColumns function. See here for another example.

  • OK, that works for me -- thanks. Now, as to another part of the question. We have a column in the SP List called Active and (currently) every item is active, but in the future, I expect some to become inactive (or Active = "no") as we change suppliers, etc. To incorporate this parameter into you equation, would I use: SortByColumns( Search(Filter('Inbound RM Inspection', Active="yes"), SearchBox.Text, "Title"), "Title") to filter out the inactive parts (items)?
    – gpence
    Dec 10, 2018 at 20:28
  • Correct, you can nest the filter and search functions.
    – Mike2500
    Dec 10, 2018 at 20:33
  • Thank you for all of your help, Mike2500. I do appreciate it!
    – gpence
    Dec 10, 2018 at 20:35
  • you're setting filtertoggleicon, and then using filtertoggle? Also, if filtertoggle is a variable, it shouldn't go in quotes.
    – Mike2500
    Dec 18, 2018 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.