Question

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?

Thanks!

gpence

Was it helpful?

Solution

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:

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top