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

Power App icon that makes calendar visible/invisible

Hello!

I am new to Power Apps, and ran into a problem that seems like I cant solve.

 

I have a calendar icon on my page, as well as a calendar that has a submit button and is invisible by default. I would like to do: If I press the icon, the calendar becomes visible, and when i press the submit button the calendar becomes invisible.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
BrianS
Super User
Super User

Set the Visible property of your Calendar to a variable (var_ShowCalendar) then use the OnSelect of the other 2 controls to adjust the variable. In the Icon use:

Set(var_Showcalendar, true)

On the Submit button add:

Set(var_ShowCalendar, false)

to whatever else your Submit button does

View solution in original post

HenriDesmet59
Resolver IV
Resolver IV

Hello @lvczk ,

 

You can use a context variable to tell a control to be visible or not.

In the "OnVisible" of your screen, create a variable : 

UpdateContext({var_calendar_visible:false})

Put this variable in the "Visible" property of your calendar and submit button like this : 

var_calendar_visible

With the variable set to false in the OnVisible, you will not see the calendar and button when you arrive in the screen.

 

To tell the calendar to show up, we put in the "OnSelect" property of the calendar icon this : 

UpdateContext({var_calendar_visible:true})

 The calendar will show up.

 

To hide the calendar on the press submit button you can put at the end of the OnSelect of the button this :

UpdateContext({var_calendar_visible:false})

The calendar and the submit button will be hided.

 

Tell me if It's helps you 🙂

 

Henri

View solution in original post

2 REPLIES 2
BrianS
Super User
Super User

Set the Visible property of your Calendar to a variable (var_ShowCalendar) then use the OnSelect of the other 2 controls to adjust the variable. In the Icon use:

Set(var_Showcalendar, true)

On the Submit button add:

Set(var_ShowCalendar, false)

to whatever else your Submit button does

HenriDesmet59
Resolver IV
Resolver IV

Hello @lvczk ,

 

You can use a context variable to tell a control to be visible or not.

In the "OnVisible" of your screen, create a variable : 

UpdateContext({var_calendar_visible:false})

Put this variable in the "Visible" property of your calendar and submit button like this : 

var_calendar_visible

With the variable set to false in the OnVisible, you will not see the calendar and button when you arrive in the screen.

 

To tell the calendar to show up, we put in the "OnSelect" property of the calendar icon this : 

UpdateContext({var_calendar_visible:true})

 The calendar will show up.

 

To hide the calendar on the press submit button you can put at the end of the OnSelect of the button this :

UpdateContext({var_calendar_visible:false})

The calendar and the submit button will be hided.

 

Tell me if It's helps you 🙂

 

Henri

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,290)