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

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

 

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

 

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

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

 

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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,755)