web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Switch visibility

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good Afternoon.

 

Sory for my English. I wanted to make an inquiry.

 

I have a Y/N switch, i want two date/time fields to be visible when it is at 1 and when it is at o they are not visible.

 

Try the following command line:

 

IF(DataCardValue22.Value = 1, dataValue4.Visible = 1)

 

But it does not work. Could someone tell me how to continue ?

 

From already thanks you very much.

Greetins from Argentina.

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You cannot "set" the properties of a control in PowerApps.

    What you will want to do is to go to the Visible property on the controls that you wish to make visible or not and put this formula:

        DataCardValue22.Value = 1

    If the Value of your DataCardValue22 is 1, then this will be "true", thus your control Visible will be "true" and will be visible.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, sorry.

     

    What I want is to make the date/time fields visible when the siwtchs is "true". Is this possible ? In what way could i do it =

     

    I attach some images to make it clearer.

     

    Screenshot_1.jpg

    Screenshot_2.jpg

    Screenshot_3.jpg

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    I assume by switch you mean the Toggle control.

     

    If so, then same thing...just set the visible property of the controls  you want to change visibility on to:

        yourToggleControlName.Value

     

    If the toggle is on, then the controls will be visible.  If not, then they will not.

  • Loose Chippings Profile Picture
    185 on at

    I think you are very close. On the Visible property of Martes Hi and Martes HF Data Cards, you need If('Martes SN' = true, true, false), where Martes SN is the name of your Y/N toggle.

     

    This is saying "if the toggle is set to true, make the data card Martes HI and Martes HF visible, otherwise make them not visible"

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @LooseChippings 

    You will need to check the "Value" of the control - 'Martes SN'.Value to get the true or false.

    Also, there is no need for all the extra true and false in the visible property.

    'Martes SN'.Value will be already either true or false.  There is no extra need for then return another true or false.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for all friend

     

    Regards

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard