Summary
I have a calendar with each date arranged as below using a Gallery:
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.
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!
Solved! Go to Solution.
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)
)
)
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.
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)
)
)
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.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
204 | |
187 | |
70 | |
39 | |
34 |
User | Count |
---|---|
349 | |
269 | |
122 | |
78 | |
61 |