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.

 

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.

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.

 

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.

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.

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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,357)