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 / show/unhide based off ...
Power Apps
Answered

show/unhide based off of day selected in calendar picker

(0) ShareShare
ReportReport
Posted on by 41

We have a reservations app and the user can select their location, is it possible to show/hide a specific location based on a day that is selected? IE i want to show this choice only on Monday and Friday, and have it hidden during the rest. Is this possible?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Kbostwick ,

     

    I've made a test for your reference:

     

    I assume there is a location list:

     

    ClearCollect(
     LocationList,
     {Value:"Location1"},
     {Value:"Location2"},
     {Value:"Location3"}
    );

     

     

    You could try:

     

    Filter(LocationList,If(Not(Weekday(DatePicker1.SelectedDate) in [2,6]),Value<>"Location3",true))

     

     

    Best Regards,
    Bof

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @Kbostwick 

     

    I am not sure how you have your reservation app set up, but I have a solution that may work for you.

     

    I have a label control that reads the selected day from the date picker control. 

    Text Property - Text(dteReservationDate.SelectedDate, "dddd")

     

    A dropdown control to show available locations.

    Items Property - If(lblSelectedDay.Text = "Friday" || lblSelectedDay.Text = "Monday", ["Location 1", "Location 2"], ["Location 1", "Location 2", "Location 3"])

     

    Please tick Accept as solution if the answer is useful.

     

    Thanks, @AARON_C 

  • Kbostwick Profile Picture
    41 on at

    Here is what the app is setup like:

    Calendar View:

    Kbostwick_0-1695325750779.png

    The reservation screen where the location is listed as a drop-down:

    Kbostwick_1-1695325793184.png

     

    My list collects start date w/time and end date w/time. Workspace is where I would like to show/hide certain rooms on a specific day selected (monday or friday).

  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @Kbostwick,

     

    I have tweaked @v-bofeng-msft formula a bit to make it work with choice column (I assume your locations are in a choice column).

     

    Filter(Choices(LocationOptions),If(!(Weekday(DateValue1.SelectedDate) in [2,6]),Text(Value)<>"Location",true))

     

    On the DefaultDate property of the Start Date put in: _dateSelected 

    If you have not changed any variables when you created the Calendar screen this should work.

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Kbostwick Profile Picture
    41 on at

    Thank you, I will work on this later today and provide an update to my thread.

  • Kbostwick Profile Picture
    41 on at

    My dropdown is called Workspace, would i put this filter into the default for Workspace?

  • Kbostwick Profile Picture
    41 on at

    Got it to work, I placed your formula (modified with my list names) in the Items for Workspace and it works perfectly! Thank you all so much!!!!!!

  • Kbostwick Profile Picture
    41 on at

    Just an update, I am hoping someone can help me out. I need to add an additional condition to this formula, we have another "seat" that needs to be added to the monday/friday listing. I tried the following:

     

    Filter(Choices([@HybridReservations].Workspace),If(!(Weekday(hybriddate1.SelectedDate) in [2,6]),Text(Value)<>"Front desk, room 430, PC (no docking station)",Text(Value)<>"430 #1",true))

     

    This did not work, how can I add an OR statement into the original equation? Or at least add another condition, I thought I had the structure down based off another post in the community but it doesnt seem to work when I run the app.

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard