cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ELGHAZI009
Level: Powered On

Sort By Columns, Specific Date Value to match

Hi

I have tried to folow this article over here, but I could not get through, hopefuly I can get some help here since I am totally new to powerapps.

I'm tring to sort a gallery using the formula, and I want show in my app just data that been created on the last 2 days  ["Today"]-2

and this is my formula :

SortByColumns(Filter('Gasoil app', StartsWith(Title, TextSearchBox1.Text)), "Created",Descending)

Now can I deploy the ["Today"]-2 based on column 'LETEMP' on my fromula.

Thnak you.

 

3 REPLIES 3
PowerApps Staff mabolan
PowerApps Staff

Re: Sort By Columns, Specific Date Value to match

It looks like you're tring to update your formula so that it also filters on the LETEMP column.

 

To do this, you can update the filter part of your function like so...

 

SortByColumns(Filter('Gasoil app', StartsWith(Title, TextSearchBox1.Text) && LETEMP > DateAdd(Today(),-2)), "Created", Descending)

 

ELGHAZI009
Level: Powered On

Re: Sort By Columns, Specific Date Value to match

First of all, thank you for your response, but I did as you demontreat yet I get this message:powerapps.PNG

 

 

 LETEMP is Le_x0020_temps

PowerApps Staff mabolan
PowerApps Staff

Re: Sort By Columns, Specific Date Value to match

This is more of a warning than an error. 

 

Some operations, like date filtering, are not delegatable to the server. Currently, we only allow PowerApps to pull at max 2000 records for client side filtering (learn how to change their data row limit here). This means that if you have a lot of records, then PowerApps will only filter the first 2000.

 

 

One way to get around this issue in your case is to first sort the results before filtering, like so...

 

Filter(Sort(Parent_1, Created, Descending), Created > DateAdd(Today(),-2))

This will always ensure that you filter the 2000 most recently created records (You will still the the blue delegation warning). If you have more than 2000 records created in the last two days, then this solution might not work for you.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,517)