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 / How to show hide diffe...
Power Apps
Unanswered

How to show hide different sections of app.

(0) ShareShare
ReportReport
Posted on by 221

I would like to show/hide different sections of my app. I currently have when I select the plus icon of electrical it will expand to show a form and hide the other sections. I cannot get it to work for the other sections like "mechanical", "pneumatic" and so on. Can you please help?

EMA03356_0-1719014624515.png

EMA03356_1-1719014637963.png

 

Categories:
  • Muralidharan Profile Picture
    340 on at

    @EMA03356 

    Yes, that's possible. I believe, at the given point of time, always only one section will be shown and other sections will be hidden correct. If so, you can use show / hide variables to manage it. 

    Let me know, if you need any help on this.

     

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

    Hi @EMA03356 ,

     

    What is the structure of the Screen?

    If they are in a Gallery, I'm afraid you need to create a new Yes/No column for recording which item is selected.

    When user select 'Add' button, update true to new column.

    OnSelect of 'Add' button.

    Patch(DataSource,LookUp(DataSource,ID=ThisItem.ID),{NewColumn:true});//Show Form when people select button firstly.
    Patch(DataSource,LookUp(DataSource,ID=ThisItem.ID),{NewColumn:false})//Hide Form when people select button secondly.

    Items of Gallery.

    Filter(DataSource,true||NewColumn=true)

     

    If the Form is inside Gallery, please refer to this.

    Item of Form.

    ThisItem

    Visible of Form.

    ThisItem.NewColumn

    If the Form is outside Gallery, please refer to this.

    Item of Form.

    Gallery.Selected

    Visible of Form.

    !IsBlank(Filter(DataSource,NewColumn=true))

    If the Form is inside Gallery, please refer to this.

    !IsBlank(Filter(DataSource,NewColumn=true))

     

     

     

     

    Best regards,

    Rimmon

  • EMA03356 Profile Picture
    221 on at

    Can you help me with the show / hide variables? I'm not sure how to do this. I got it to work with just one variable to do the first section, but not the others. 

  • EMA03356 Profile Picture
    221 on at

    I'm sorry, I'm not following this. I just need to show/hide text that is on my screen when selecting icon. 

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

    Hi @EMA03356 ,

     

    It seems that I misunderstood the requirement.

     

    If you want use variable to show/hide text on your screen, I recommend you set variables for each text label, when user selects the plus icon of electrical, set other variables to false.

    Set(var2,false);
    Set(var3,false);
    Set(var4,false);

     

     

    ______________________________________________________________________________________________________________________

    If my answer helps you solve the problem, please accept it as a solution.

    If you have another question, please post it in new post.😀

     

    Best regards,

    Rimmon

  • Prakhar_Gupta1 Profile Picture
    51 on at

    Hi @EMA03356 , 

     

    Yes, this way may solve your query, 

     

    Write code in Plus icon of electrical.

    Set(varTab1, true);

    Set(varTab2, false);

    Set(varTab3, false);

    Set(varTab4, false);

     

    Write code in Plus icon of Mechanical.

    Set(varTab1, false);

    Set(varTab2, true);

    Set(varTab3, false);

    Set(varTab4, false);

     

    Follow the same logic for other control.

     

    Hope this helps.

     

    If my answer helps you solve the problem, please accept it as a solution.

    If you have another question, please post it in new post.

     

    Thanks

  • EMA03356 Profile Picture
    221 on at

    Do I need to set the variable on the text somehow? How will it know which text is which variable?

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

    Hi @EMA03356 ,

     

    You can distinguish the variables of each text by naming them when creating Boolean variables. Then place the variable on the visible property of the text.

     

    For example, when the user clicks on the "electrical" button and text 1 and text 2 are displayed, then they should use same variable.

     

    Best regards,

    Rimmon

  • EMA03356 Profile Picture
    221 on at

    What do you mean by naming them when you create boolean variables? I'm very new to this and not sure where to do that. 

     

    I'm not understanding your example. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard