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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set maximum in dropdow...
Power Apps
Answered

Set maximum in dropdown and use the Today date

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I have a PowerApp that is use to make appointments. The list contains some timeslots and they can be different every day.

For example:

Monday: 08:00am / 09:00am / 10:00am

Tuesday: 09:00am / 10:00am

Wednesday: 08:00am / 09:00am / 10:00am / 11:00am

 

The list contains values that are editable by an admin screen which users can't see.

 

What I would like to have is the possibility to ignore the days behind us and limit the timeslots that are ahead of us.

 

The latter is working well:

 

FirstN(SortByColumns(Filter(collChoices,Locatie = DropdownLocatie_2.Selected.Result, Value(Available) > 0),"Title",Ascending),25)

 

With this I can limit the dropdown to 25 timeslots (unfortunately not in days, I would prefer that by the way....)

 

But in the dropdown you can also see the days that already have been. So yesterday is still in the dropdown and therefor the dropdown is still limited to the exact same timeslot as it was limited to yesterday.

 

How can I prevent those days to be shown?

The contents of the list (column "Title" in list "Choices List") :

2020/05/18 08:00
2020/05/18 09:00
2020/05/18 10:00
2020/05/19 08:00
2020/05/19 09:00
2020/05/19 10:00

 

The bold ones (yesterday) I don't want to see in the dropdown on the 19th. On the 20th I don't want to see the 19th - choices. Ultimately I don't want to see the timeslots of 08:00am and 09:00am when it is already 09:05am if you know what I mean.

 

Any thoughts ?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Hi @mvveelen ,

    Try (change to your field name)

    FirstN(
     SortByColumns(
     Filter(
     collChoices,
     Locatie = DropdownLocatie_2.Selected.Result &&
     Value(Available) > 0 &&
     YourDateFieldName <Today()
     ),
     "Title",
     Ascending
     ),
     25
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • mvveelen Profile Picture
    8 on at

    Hi, thanks, what do I use for "YourDateFieldName" ?

    The list "Choices List" is like this (see attachment):

     

     

    list.png
  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    @mvveelen ,

    Assuming it is a Date/Time field, it is Title (or am I missing something?)

    FirstN(
     SortByColumns(
     Filter(
     collChoices,
     Locatie = DropdownLocatie_2.Selected.Result &&
     Value(Available) > 0 &&
     Title<Today()
     ),
     "Title",
     Ascending
     ),
     25
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • mvveelen Profile Picture
    8 on at

    Yes it is, and I tried. But it doesn't work: Tile gives me an error:

    Invalid argument type. Expecting a Number value.

     

    So I'm comparing a Text with Today() and that doesn't work.

  • Verified answer
    WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    @mvveelen ,

    The question I asked (which I think I know the answer to now) was Title a Date/Time field? I assume now it is a Text field and that makes sense anyway. Try this

    FirstN(
     SortByColumns(
     Filter(
     collChoices,
     Locatie = DropdownLocatie_2.Selected.Result &&
     Value(Available) > 0 &&
     DateValue(Title)>Today()
     ),
     "Title",
     Ascending
     ),
     25
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • mvveelen Profile Picture
    8 on at

    I'm sorry, I overlooked that. It is a text field indeed.

    Wait, isn't it so that the DateValue(Title) Today() should be DateValue(Title) Today() ?

    Yes ! With < I see only the days before and with > I only see the days after. This is exactly what I need. I changed it to:

    DateValue(Title) >= Today()

  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Thanks @mvveelen ,

    Yes - wrong way around - fixed so as not to confuse anyone looking at it. I was more focused on the DateValue part.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard