cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

How do I show red circles for monthly calendar view events?

Hi, 

 

I'm trying to build a simple Calendar app that uses a SharePoint list as the Data source.  

I got the names to show on a side Gallery, but the Month-view Gallery shows Red circles for all dates, even though I have no events for these dates. 

 

The collection capturing the input is as follows:

 

Collect(NaviaPTO, {StartDate: StartDatePopUp_1.SelectedDate, EndDate: EndDatePopUp_1.SelectedDate, Resource: ResourceName_1.Selected.DisplayName, OOOType: OOO_Type_1.SelectedText.Value})

 

 

My on select for the circle is:

 

CountRows(Filter(NaviaPTO,DateValue(Text('StartDate'))<=DateAdd(_firstDayInView,ThisItem.Value,Days),DateValue(Text('EndDate'))>=DateAdd(_firstDayInView,ThisItem.Value,Days)))>0&&!Subcircle1_2.Visible&&ResourceName_1.Visible

 

 

 

Any help would be greatly appreciated. 

 

Navia_calendar.jpg

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @F_Quint ,

Regarding the screenshot that you mentioned, I think there is something wrong with your operation.

 

Just as I mentioned before, you should apply the following formula:

CountRows(
           Filter(
                   NaviaPTO,            
                   DateValue(Text(StartDate)) <= DateAdd(_firstDayInView,ThisItem.Value,Days),
                   DateValue(Text(EndDate)) >= DateAdd(_firstDayInView,ThisItem.Value,Days)
           )
)>0 && !Subcircle1_2.Visible && Title3_2.Visible

into the Visible property of the Circle2_3 control rather than the OnSelect property as your screenshot mentioned. The OnSelect property would be fired when you click this Circle2_3 control. The Visible property of the Circle2_3 control would be used to control the visible of the red circle.

 

Please check if the solution in the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Calendar-gallery-display-circles-for-each-da...

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi @F_Quint ,

Do you want the red circle to be shown up for these dates which have Calendar Events?

 

Regarding the formula and operation that you mentioned, I think there is something wrong with it. Firstly, if you want to control the visible of the red circle in your MonthDayGallery1_2, you should apply the second formula into the Visible property of the Red circle icon (Circle2_2).

 

Please set the Visible property of the Red Circle (Circle2_2) to following:

CountRows(
           Filter(
                   NaviaPTO,            
                   DateValue(Text(StartDate)) = DateAdd(_firstDayInView,ThisItem.Value,Days)
           )
)>0 && !Subcircle1_2.Visible && Title3_2.Visible

or

CountRows(
           Filter(
                   NaviaPTO,            
                   DateValue(Text(StartDate)) <= DateAdd(_firstDayInView,ThisItem.Value,Days),
                   DateValue(Text(EndDate)) >= DateAdd(_firstDayInView,ThisItem.Value,Days)
           )
)>0 && !Subcircle1_2.Visible && Title3_2.Visible

 

Please try above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft  Thank you for that reply.  

I tried what you suggested and I do show the red circle, but not for the dates in between. See side gallery dates.

 

Navia_calendar.jpg

Hi @F_Quint ,

Regarding the screenshot that you mentioned, I think there is something wrong with your operation.

 

Just as I mentioned before, you should apply the following formula:

CountRows(
           Filter(
                   NaviaPTO,            
                   DateValue(Text(StartDate)) <= DateAdd(_firstDayInView,ThisItem.Value,Days),
                   DateValue(Text(EndDate)) >= DateAdd(_firstDayInView,ThisItem.Value,Days)
           )
)>0 && !Subcircle1_2.Visible && Title3_2.Visible

into the Visible property of the Circle2_3 control rather than the OnSelect property as your screenshot mentioned. The OnSelect property would be fired when you click this Circle2_3 control. The Visible property of the Circle2_3 control would be used to control the visible of the red circle.

 

Please check if the solution in the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Calendar-gallery-display-circles-for-each-da...

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-xida-msft  you were right, I had it on the OnSelect. 

sorry about that! And thank you for your help!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (59,491)