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 Platform Community / Forums / Power Apps / Changing Visible prope...
Power Apps
Answered

Changing Visible property in an if statement

(0) ShareShare
ReportReport
Posted on by 28

Hello,

 

I am new on Powerapps and trying very basic thing but it doesn't work. I have two galleries and two radio buttons. I want if first value of radio selected then gallery1 is visible. If second value of radio selected then gallery2 visible.

 

I tried this code block in onchange of the radio:

If(
Radio2.Selected.Value = "Parameter Value",
Gallery_ParameterGroup.Visible = false;
ParameterGroupLabels.Visible = false;
Gallery_ParameterValue.Visible = true;
ParameterValueLabels.Visible = true,
Gallery_ParameterGroup.Visible = true;
ParameterGroupLabels.Visible = true;
Gallery_ParameterValue.Visible = false;
ParameterValueLabels.Visible = false
)

When I change the value of radio, nothing has changed. Can anybody help?

Categories:
I have the same question (0)
  • Verified answer
    QuentinDURIEZ Profile Picture
    577 Moderator on at

    Hi,

     

    You can't modify components properties outside of the said component, you need to add formulas in this properties directly.


    To make it works, you need to edit the "Visible" property of your gallery

     

    Like this : 

     

    image.png

    Regards,
     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @brokenmyth ,

     

    Please try this:

    Visible of gallery1: Radio.Selected.Value="first value"
    Visible of gallery2: Radio.Selected.Value="second value"

     

    Best regards,

    Rimmon

  • brokenmyth Profile Picture
    28 on at

    Hello @QuentinDURIEZ,

     

    Thank you for your reply. It works. Your first sentence is very valuable fact. Also thank you for your effort and screenshot.

     

    Kind regards.

  • brokenmyth Profile Picture
    28 on at

    Hello @v-mengmli-msft,

     

    Thank you for your reply, I guess its about modifying components on the outside are not permitted.

     

    Kind 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard