cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Visible if the Date is Between a Date Range

Summary

I have a calendar with each date arranged as below using a Gallery:

Calendar.png

 

 

 

 

 

The small blue dot below each date is currently only visible if there is an event on that date in a 'Holiday Calendar' list (using the 'start time & 'end time' fields AND the user assigned to the holiday event matches the user logged into the app.

 

calendar2.png

 

Issue

The above is all working fine and as expected. However....

 

The 16th & 20th dates which have a blue dot below them in the screenshot above is actually a WEEK booking event with 'start time' of the 16th and 'end time' of the 20th. Therefore I am looking to have my below code modified to allow the system to recognise this and also put blue dots below the 17th, 18th, & 19th as these dates are in between the 16th & 20th.

 

CountRows(Filter('Holiday Calendar', DateValue(Text('Start Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title|| DateValue(Text('End Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title))

 

Thank you for your assistance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank You Eric!

 

The code provided didn't work straight away however provided great assistance in finding the correct solution. See below your code amended by myself to do the job -

 

CountRows(Filter('Holiday Calendar', DateValue(Text('Start Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title

||

DateValue(Text('End Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title

||

And(

DateValue(Text('Start Time')) < DateAdd(_firstDayInView,ThisItem.Value,Days),

DateValue(Text('End Time')) >

DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title)

)

)

View solution in original post

4 REPLIES 4
Super User
Super User

Try this. You'll need to check if the start date is before the current date and if the end date is greater than the current date. Else it will either be caught by the first two checks or it's not an event date.

CountRows(Filter('Holiday Calendar', DateValue(Text('Start Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title
||
DateValue(Text('End Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title)
||
And(
DateValue(Text('Start Time')) < DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title,
DateValue(Text('End Time')) >
DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title)
)
)

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

Helper V
Helper V

In a blank cell, say Cell B2, copy and paste the below formula into it and press the Enter key.

=IF(AND(A2>$B$1,A2<$c$1),A2, FALSE)

 

I hope this helps!

Regards,

Max

 

Thank You Eric!

 

The code provided didn't work straight away however provided great assistance in finding the correct solution. See below your code amended by myself to do the job -

 

CountRows(Filter('Holiday Calendar', DateValue(Text('Start Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title

||

DateValue(Text('End Time')) = DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title

||

And(

DateValue(Text('Start Time')) < DateAdd(_firstDayInView,ThisItem.Value,Days),

DateValue(Text('End Time')) >

DateAdd(_firstDayInView,ThisItem.Value,Days)&&User().FullName=Title)

)

)

View solution in original post

I am dealing with a similair feature where I am trying to make the dot visible in my calendar gallery if a user has requested and been granted holiday on some specific dates. I have tried with some if-statements on the circle.visible property, but haven't managed to make it work. Would it be possible for you to share how you made the dot visible in the gallery in the first place? I am new to Powerapps, so it might be more simple than I am making it up to be. 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,544)