Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Help with controlling datacard visibilty with yes/no toggle input

(0) ShareShare
ReportReport
Posted on by 30

Hello,

 

I have a very large form with several fields. I want a certain portions of the form to only be visible if the "toggle" yes/no input associated with those fields is checked to "true".

 

On one of the datacards I want to control I have gone to the "visible" option and tried the following:

 

If(DataCardValue35.Selected.Value = 'true', true, false)

 

this makes the data card hidden, but does not make it visible when I set the toggle to true.

 

Any idea what I am doing wrong? Thank you for any help. I am very new to all of this. 

 

Categories:
  • Shaguar357 Profile Picture
    211 on at
    Re: Help with controlling datacard visibilty with yes/no toggle input

    Thank you @WarrenBelz !  This worked for me!

     

  • Verified answer
    v-siky-msft Profile Picture
    on at
    Re: Help with controlling datacard visibilty with yes/no toggle input

    Hi @SamR ,

     

    I feel confused with DataCardValue35. What is this? Where is this?

    It is seemly impossible to be a Toggle control since Toggle control cannot be generated in EditForm by default, and  'Selected' property is not for Toggle control. Please make more description.

     

    In your case, you can try to put ToggleName.Value to Visible of DataCard directly.

    Test Result:

    GIF_47.gif

    Sik

  • WarrenBelz Profile Picture
    146,535 Most Valuable Professional on at
    Re: Help with controlling datacard visibilty with yes/no toggle input

    Hello @SamR ,

    I assume DataCardValue35 is a toggle?

    Set a Variable on the OnChange property

    UpdateContext({vShow:!vShow})

    This will toggle between true and false - Visible property on the controls you want hidden is vShow

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,535 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard