Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • EMA03356 Profile Picture
    221 on at
    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 at
    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 at
    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 at
    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 at
    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 at
    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 at
    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 at
    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 at
    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

🌸 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,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard