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 / Press a button upon la...
Power Apps
Unanswered

Press a button upon landing on the screen

(0) ShareShare
ReportReport
Posted on by 228

I have a home page with a button that navigates to another screen with a button that when pressed certain cards become visibled. The default view of the form should be the results of pushing the button. The current code from the button on the homepage is this:

Navigate(ScreenNCANew,ScreenTransition.Fade); ResetForm(NCAForm_2); Select(ScreenNCANew!Name=NCAGeneralInfo_2)

 

ChatGPT gave me that code but it's not working. I have tried other things but the form still comes up blank.

 

All of the fields that should appear by default, all have the following code on the visible property: NCAGeneralInfo_2.DisplayMode=DisplayMode.Disabled. The NCAGeneralInfo_2 is the button that should be pressed upon navigating to the screen.

 

If there is another approach to doing this? I'm totally open to it. My goal is to make some fields visible when a particular button is pushed and other fields visible when another button is pushed.

Categories:
I have the same question (0)
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    I'm not sure what that Navigate formula is trying to do, but for your question regarding "make some fields visible when a particular button is pushed and other fields visible when another button is pushed" you can use a variable.

     

    Here's an example for Button1 OnSelect:

    Set(varButton1,!varButton1)

     

    Visible property of your field:

    varButton1

     

    When Button1 is pressed, it toggles the variable "varButton1" to true or false.  And the visible property of the field also toggles to true or false at the same time.

  • ShondaT Profile Picture
    228 on at

    @Rusk 

     

    I didn't explain it very well. 

     

    I have a "tab" called General which is a button. That button, when pressed, should be the default view when users land on the screen. That means the button has to be pressed upon navigating to the screen. What code do I need to put on the button that navigates from the home screen to the screen containing the General button that would "Press" the button?

     

    this is the code that is currently on the button on the home screen: 

     

    Navigate(ScreenNCANew,ScreenTransition.Fade); ResetForm(NCAForm_2); Select(ScreenNCANew!Name=NCAGeneralInfo_2)

     

    The last part was supposed to "select" or "press" the button which is called "NCAGeneralInfo_2". I have tried various codes that seem to only render the button unPressed.

     

    I hope that's more clear. Thanks for your time.

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Sorry, I still don't understand the scenario.  The default view should only be viewed when the button is actively pressed?  Or the default view should be navigated to (via the Tab button) when the button is pressed?

  • SeavinUfes Profile Picture
    4 on at

    I think i can help you...

     

    If the screen needs to launch with a button pressed as default, just go to the "OnVisible" propriety and set the formula: Select(button_name). Just that!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard