cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrickPP
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

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
eka24
Super User III
Super User III

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

Hey, 

 

thanks for the quick answer. 

 

Unfortunately i still get the error with that change. 

 

 

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
PatrickPP
Frequent Visitor

I am using 2 Sharepoint Lists.

1. IT Change Log 

2. IT Systemliste 

 

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

 

 

 

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

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. 

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (80,300)