I have a Collection of dates defined by:
Collect(_mydates,ForAll(Table1,DateValue(Text(Date,DateTimeFormat.ShortDate))));
(creates list of dates from Date column in Table1)
And I am using Calendar Gallery modified from Calendar Screen in Powerapps and David Nissimoff's blog entry: Building an interactive calendar view with PowerApps
I have added a Circle to the MonthDayGallery of the calendar and would like to make the circle visible for every date that shows up in the Collection using the Visible parameter of the circle along with the Fill parameter.
Thanks in advance for any ideas?
Additional Notes:
Solved! Go to Solution.
Hi @akmiecik1 ,
Could you please share a bit more about your scenario?
Do you want to highlight the dates listed in your Collection within your Calendar Gallery?
I have made a test on my side, please consider take a try with the following workaround:
1. Add a Calendar screen within your app.
2. Set the Visible property of the Subcircle1 within the MonthDayGallery1 to following:
If(
(DateAdd(_firstDayInView, ThisItem.Value) = _dateSelected || DateAdd(_firstDayInView, ThisItem.Value) in _mydates) && Title2.Visible,
true,
false
)
Note: The _mydates represents your dates collection in your app.
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Hi @akmiecik1 ,
Could you please share a bit more about your scenario?
Do you want to highlight the dates listed in your Collection within your Calendar Gallery?
I have made a test on my side, please consider take a try with the following workaround:
1. Add a Calendar screen within your app.
2. Set the Visible property of the Subcircle1 within the MonthDayGallery1 to following:
If(
(DateAdd(_firstDayInView, ThisItem.Value) = _dateSelected || DateAdd(_firstDayInView, ThisItem.Value) in _mydates) && Title2.Visible,
true,
false
)
Note: The _mydates represents your dates collection in your app.
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Kris, Thank you so much.
I modified your answer to include two circle with the Visible for today's circle set to:
And(DateAdd(_firstDayInView, ThisItem.Value) = _dateSelected)
(that's the default value that comes with Calendar Screen)
and the Visible for the circles to show _mydates set to (the mydates_circle):
If( (DateAdd(_firstDayInView, ThisItem.Value) in _mydates) && Title2.Visible, true, false )
Then I got to thinking. What if:
I added to the Collection of _mydates another column called EventType with two options (A and B)
What would it take to make the Circle for A red, and the Circle for B green.
Adding the column to the collection of my dates creates an error in the mydates_circle.Visible: invalid schema, expected on column table
Trying to work it from there.
Another approach:
Modify the Visible statement from the circle to looks directly at the excel table.
This example does not work but may help for people to understand:
If( (DateAdd(_firstDayInView, ThisItem.Value) in Table1.mydates) && Title2.Visible, true, false )
In the above example of bad code,
Table1.mydates
needs to be replace with,
ForAll(Table1,DateValue(Text(Date,DateTimeFormat.ShortDate)))
Resulting in a Visible statement for the circle that looks like:
if( (DateAdd(_firstDayInView, ThisItem.Value) in ForAll(Table1,DateValue(Text(Date,DateTimeFormat.ShortDate)))) && Title2.Visible, true, false )
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
192 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
261 | |
86 | |
71 | |
70 | |
66 |