Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

When I click the add icon, I want something to disappear.

(0) ShareShare
ReportReport
Posted on by 221

When clicking the electrical add icon I want the mechanical portion to disappear and other fields to appear to enter. How do I do this? 

 

EMA03356_0-1700065609622.png

 

Categories:
  • AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: When I click the add icon, I want something to disappear.

    Hi @EMA03356 

     

    I assume you are using a form and added custom DataCards to show the different section headings.

    What I have done, Add all the inputs you want into your form and arrange them in the order you like separated by the headings.

     

    On the Onselect property of the Add icon for Electrical:

    UpdateContext({showElectrical: true, showMachanical: false});

    Do the same for Machanical but change to the correct values. (Machanical - true, Electrical - false)

     

    On the DataCard for each input control, on the Visible property add in either showElectrical or showMachanical according to what header it comes under.

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • EMA03356 Profile Picture
    221 on at
    Re: When I click the add icon, I want something to disappear.

    Hello again, I am still unable to get this to work. Thank you!

  • EMA03356 Profile Picture
    221 on at
    Re: When I click the add icon, I want something to disappear.

    Hello I tried what you put above and updated the "electrical" with the icon name and entered into the visible property of what I wanted to hide. I'm getting an error. 

  • QuentinDURIEZ Profile Picture
    505 Super User 2025 Season 1 on at
    Re: When I click the add icon, I want something to disappear.

    Hi,

    It looks like your implementing some sort of tabs, I'm correct ?

    To make it works, add a UpdateContext formula on the Add icon "OnSelect" property to save which element is on focus

    UpdateContext({_ctxVar : "Electrical"})

     

    Then use this context variable on the OnVisible property of what needs to be hidden : 

     

    Element.OnVisible = !IsBlank(_ctxVar) And _ctxVar <> "Electrical"

     
    And then, if you need more, apply the same logic to other icons and vary the _ctxVar value

    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

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard