cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
Post Prodigy
Post Prodigy

how to display the top 2 records today - Sort Gallery ?

Hi

 

I like to display top 2 today's upcomingrecords.. what did I do wrong.  Thanks 

 

Date field in SP is Date and Time.

 

bbsin_0-1622788409747.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

Use below formula since I believe there would not be many filtered records that DateBooked later than today, so although delegation issue would still be there, you could ignore it.

With({Filtered: Filter('data source',DateBooked >= Today())},Filter(Filtered,Lower(ReservedBy.Email) = Lower(varUser)))

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

View solution in original post

33 REPLIES 33
v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

Could you please tell:

1\ What is the Control and property you are applying the formula on?

 

2\ The whole formula?

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

hi @v-jefferni 

 

I want to the items that are happening today top 2 base on the start time and date, title and status confirmed and items that are blocked by the current user not other info.

 

Status and title are text field

Start Date - is set as date and time

thanks

 

will this help??

 

bbsin_0-1622789792049.png

 

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

The formula is with wrong syntax, an extra coma as well as a closing parenthesis.

v-jefferni_0-1622791009983.png

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

Hi @v-jefferni 

 

Thanks for pointing it out.. but why no data showing.. am I missing something?  Thanks

 

bbsin_0-1622795801080.png

 

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

Not sure, please check the values of varUser.Email and EmployeeEmail, maybe it is the capitalization issue. If so, add Lower() to both EmployeeEmail and varUser.Email

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

@v-jefferni 

 

it's still not showing??

bbsin_3-1622857918305.png

 

 

bbsin_1-1622857835099.png

 

bbsin_2-1622857892893.png

 

Thanks

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

Please try in the filter function:

 

Lower(ReservedBy.Email) = Lower(varUserEmail)

 

 

The point of checking gallery filtered items is restrict conditions from one to more, first check the whole data table without any condition(remove the filter function but leave the data source), then add filter function and try all conditions one by one.

 

On your end, try Lower(ReservedBy.Email) = Lower(varUserEmail) condition then DateBooked >= Today() one by one.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni 

Great!! it's appears now, but there's delegation warning?  How get around it?  Thanks.

bbsin_1-1623054167065.png

 

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

There's no perfect way the work around it. I just wonder why there is capitalization issue for Email addresses. Could you please consider adjust all Emails to lower case? Then the Lower() function is not needed.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,823)