Skip to main content
Community site session details

Community site session details

Session Id : KuSemYESJ5zrXCwb/8YCEy
Power Apps - Building Power Apps
Unanswered

How to show hide different sections of app.

Like (0) ShareShare
ReportReport
Posted on 22 Jun 2024 00:04:04 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:
  • EMA03356 Profile Picture
    221 on 26 Jun 2024 at 15:05:33
    Re: How to show hide different sections of app.

    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. 

  • v-mengmli-msft Profile Picture
    on 25 Jun 2024 at 09:47:44
    Re: How to show hide different sections of app.

    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 24 Jun 2024 at 17:18:41
    Re: How to show hide different sections of app.

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

  • Prakhar_Gupta1 Profile Picture
    51 on 24 Jun 2024 at 07:21:29
    Re: How to show hide different sections of app.

    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

  • v-mengmli-msft Profile Picture
    on 24 Jun 2024 at 06:05:03
    Re: How to show hide different sections of app.

    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

  • EMA03356 Profile Picture
    221 on 24 Jun 2024 at 03:23:05
    Re: How to show hide different sections of app.

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

  • EMA03356 Profile Picture
    221 on 24 Jun 2024 at 03:22:06
    Re: How to show hide different sections of app.

    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. 

  • v-mengmli-msft Profile Picture
    on 24 Jun 2024 at 01:26:21
    Re: How to show hide different sections of app.

    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

  • Muralidharan Profile Picture
    340 on 22 Jun 2024 at 02:02:59
    Re: How to show hide different sections of app.

    @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.

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete