web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter By date & Inclu...
Power Apps
Unanswered

Filter By date & Include Search Options

(0) ShareShare
ReportReport
Posted on by 135

Hello,

 

I'm creating an app that has upcoming items that I need to filter. (Somewhat like a to do list).  The idea is if you look at items on the list, you will see items due within 30 days of today first.....or with the closest due date to todays date first. either way.

 

I also need a search bar to work with this so that if I search for specific locations or tasks, the ones due closest to today will come up first. Any thoughts?

 

Bonus points if you can tell me how to do it without showing items that are too far past due. (This is for Instrument Calibrations and if it's already past due, we just need to calibrate it and move on. These are calibrated Quarterly and I don't need to see items that were due 6 months ago)

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    You've got a big bunch of questions rolled into one, so I'll provide you with a piece of code that does most of what you are after. It is based on the following assumptions about a table called myTable, with the following columns:

     

    DueDate

    ItemName

    Status (a text field that has "Calibrated" or "Uncalibrated" in it)

     

    With(
     {aDueSoon: Filter(myTable,DueSoon>=DateAdd(Today(),-92,Days), Status = "Uncalibrated")},
     SortByColumns(
     Search(aDueSoon,Search.Text,"ItemName"),
     "DueDate",
     SortOrder.Descending
     )
    )

    Search.Text is a control that you can enter search text into. This should be a delegable query too.

     

    Give it a try and let us know how it works.

  • Bvandyke22 Profile Picture
    135 on at

    So with that, the search function works, but dates do not filter to ascending/descending. I did have to remove the Status portion of the code, because I don't have a status for completed or not, as every calibration record has to be entered from scratch for each device (DOT & Company Policy for recordkeeping)....And I think that's what is going to give me the hardest time with this.

  • Bvandyke22 Profile Picture
    135 on at

    I take that back, I just had to refresh the app and the sort function now works.

     

    Given the information I have, I believe this will work good enough for what I'm trying to accomplish. Thanks for your input.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard