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

Re: URGENT! Gallery not showing all items

@Backslider88

 

This is what I'm getting now

 

DateCheck field

Capture1.PNG

 

 

Traffic List

Capture7.PNG

 

 

Error

Capture9.PNG

 

 

Backslider88
Level: Power Up

Re: URGENT! Gallery not showing all items

Not sure why it's not liking that expression. If you can get that to work I think you're golden. I'd try pasting an example of a DateCheck record in place of the ContextToday in that expression. Just to see if it works. Then proceed from there. 

 

 

Murderbot
Level: Powered On

Re: URGENT! Gallery not showing all items

Just tried this solution and I get the same delegation issue.  Querying the SP list for any column still only returns the first (oldest) 500 records for me regardless of the column.

AdamD
Level: Powered On

Re: URGENT! Gallery not showing all items

Not entirely sure if this is the problem, but it looks like "Date Check" values are in a different format than the one in your query:

6/23/2017 vs 2017-06-23

You can use FormatText() on one or either of those expressions to ensure they're being properly compared. Try formatting Today() like the following and see if it likes it:

Text(Today(), DateTimeFormat.ShortDate)
AdamD
Level: Powered On

Re: URGENT! Gallery not showing all items

@Murderbot , nevermind my above post, which will give you more delagation issues.  Obviously I wasn't thinking. Anyways!

There's a workaround @CarlosFigueira suggested here (which somehow wasn't accepted as the answer?) to this that involves doing a filter first that doesn't rely on delegation. So, for instance, I can pull the first 10,000 records from my SharePoint list (it doesn't actually have that many, but it's good to set it high) and then run the secondary filter by date on it.

 

Filter(FirstN(MySharePointList, 10000), myDateColumn=MyDatePicker.SelectedDate)


In the example I'm running it against a date picker, but for you I'd expect since your original code was working fine before delegation issues, you could add the FirstN filter to your original code:

SortByColumns(Filter(FirstN('Traffic Log', 10000), StartsWith(Name, TextSearchBox1.Text), IsToday(Created)), "Date_x0020_and_x0020_Time_x0020_", If(SortDescending1, Descending, Ascending))


Give that a try maybe and see if it's happy again.


As an aside, I faced up against this delegation issue myself when trying to sort by date in one of my Apps. I ended up somehow arriving at the same conclusion that they did in the linked thread, where I created a column that saves the date as an integer, and used that unique value to as a filter, since once it is a numeric value you can delegate it to SharePoint. It does require a whole new column though, and all your existing records would then have to be updated with that column (which sounds like a real drag).

Murderbot
Level: Powered On

Re: URGENT! Gallery not showing all items

@Adam   Agreed, the delegation issue still applies but it truncates the back end of the data instead of the front end. 

 

For my case (and, I believe the OP) I just need to display the most recent 500-1000 records, not ALL the records in the list, so just being able to pick the most recent records instead of the oldest is a good-enough solution.

 

@CarlosFigueira's workaround seems legit (haven't tried it), but ever so slightly too much work for my particular purpose. 😛

AdamD
Level: Powered On

Re: URGENT! Gallery not showing all items

Carlos was actually suggesting using the FirstN() function within filter which will return the 10,000 results. I think it was iamlee who suggested just creating a new single line column. At this point I'm not sure which approach would run you into trouble if you did have a gigantic dataset of the 10,000+ record size.

Anyways, to your point that you don't want to see every record in your data set show up in the gallery, you can then use secondary filter logic to actually winnow the list to the specific day. My first filter I suggested would be how I'd do it.

Filter(FirstN(MySharePointList, 10000), DateColumn=Today())

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 (5,980)