cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filter and SortbyColumns in a dropdown

Hey, 

 

i am working on a PowerApp where i want to Filter and Sort the Items in a dropdown. 

SortByColumns('IT Systemliste';"Title");

Datacard.jpg

 

 

This is the working "SortbyColumns" code. 

I now want to filter the Title by "Lifecycle" and that it shows all except "End of Life" from the Sharepoint list IT Systemliste field "Lifecycle".

 

I tried this one but the "<>" is an invaild argument type.

Filter(SortByColumns('IT Systemliste';"Title");Lifecycle<>"End of Life")

 

not working.jpg

 

 

 

I will add some screenshots from the Lists and the Powerapp that i am using.

 

I also dont know why i have to usw " ; " instead of " , " but it works. 

 

Kind regards. 

 

Patrick

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Filter and SortbyColumns in a dropdown

Hi @PatrickPP ,

The core issue you are getting the Delegation warning on is the <> (not) filter, which is not Delegable.

While your code should work on small data sets, the easy workaround with 160 items is to create a Collection and then filter it. You can first run this on screen entry (or any other convenient trigger)

ClearCollect(
   colITList;      //or whatever you want ot call it
   'IT Systemliste'
)

then your filter will work

Filter(
   SortByColumns(
      colITSystems;
      "Title"
   );
   Lifecycle<>"End of Life"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

7 REPLIES 7
Highlighted
Super User III
Super User III

Re: Filter and SortbyColumns in a dropdown

Try
SortByColumns(Filter('IT Systemliste';Lifecycle<>"End of Life");"Title")
Highlighted
Frequent Visitor

Re: Filter and SortbyColumns in a dropdown

Hey, 

 

thanks for the quick answer. 

 

Unfortunately i still get the error with that change. 

 

 
Highlighted
Super User III
Super User III

Re: Filter and SortbyColumns in a dropdown

Definitely this is a delegation warning. Because I tried the formula at my end, no issues.
How many records are in your table. If it's less than 2000, then go to settings and increase the delegation capacity to 2000. Otherwise what is your datasource, Sharepoint,SQL or excel
Highlighted
Frequent Visitor

Re: Filter and SortbyColumns in a dropdown

I am using 2 Sharepoint Lists.

1. IT Change Log 

2. IT Systemliste 

 

The problem is that the <> is not working somehow. 

 

 

 

Highlighted
Super User III
Super User III

Re: Filter and SortbyColumns in a dropdown

You didn't say anything on the delegation I raised.
Are you using same formula for the two.
Highlighted
Frequent Visitor

Re: Filter and SortbyColumns in a dropdown

Ah sorry i forgot. 

Yeah i changed them from 500 to 2000.  The delegation msg is still the same. 

There are about 160 records in the "IT Systemlist" list

 

What do you mean with same formular. 

Highlighted
Super User III
Super User III

Re: Filter and SortbyColumns in a dropdown

Hi @PatrickPP ,

The core issue you are getting the Delegation warning on is the <> (not) filter, which is not Delegable.

While your code should work on small data sets, the easy workaround with 160 items is to create a Collection and then filter it. You can first run this on screen entry (or any other convenient trigger)

ClearCollect(
   colITList;      //or whatever you want ot call it
   'IT Systemliste'
)

then your filter will work

Filter(
   SortByColumns(
      colITSystems;
      "Title"
   );
   Lifecycle<>"End of Life"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,080)