web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Click on a butt...
Power Apps
Answered

How to Click on a button on a different form

(0) ShareShare
ReportReport
Posted on by 349

How does one Click on a button on a different form?

 

Select(Button1) works if Button1 is on the current form.

 

But what if Button1 exists on another form ?


Can this Button Click happen in the background, or must the form appear after it it has been navigated to ?

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @vsslasd 

    Select will only impact controls on the current screen.

     

    If you're trying to kick off a formula, you might consider using a Toggle (on any screen).

    Create a toggle.  Put your formula in the OnCheck of the toggle and add one statement at the end of your formula.  Something like this : Set(runRoutine, false)

    Set the Default of the toggle to runRoutine (or whatever you call the variable above)

    Then, in places where you wanted to "select the button" instead, put a Set(runRoutine, true)

    That will toggle the toggle to true and will cause the OnCheck formula to execute.

     

    I hope this is helpful for you.

  • vsslasd Profile Picture
    349 on at

    Thank you. That was most helpful.

  • vsslasd Profile Picture
    349 on at

    This seems to work great in the Developer Studio version, but does not work in the Desktop Player version, nor on the Mobile Version.

     

    Are there any special configuration settings required for these other two environments ?

  • vsslasd Profile Picture
    349 on at

    I tried this:

    It totally works in the Studio Developer Mode.

    But it does not work in the Windows Desktop Play Mode, nor the Mobile Phone App. It starts correctly, but never does the patch or end runPatch,false.

     

    Screen2

    Button | Onselect

    Set(runPatch, true);

     

    Screen 5

    ToggleButton | OnCheck

     

    Patch Statement Here..

     

    Set(runPatch, false);

     

     

    Any thoughts ? Thank you.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @vsslasd 

    Hmm...this technique works well for me in many many apps.

     

    I would suspect there is an issue with your Patch formula.  If it never sets the runPatch to false, then it is hitting an error before it gets to that. 

  • vsslasd Profile Picture
    349 on at

    Yes, I hear  you. Thank you.
    But the issue is that it is successful in the Developer Run Mode, just not the Player Mode. I don't see how the code would would impact that.

    I will make some simple commands that I can test.

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @vsslasd 

    Yes, so again, the issue is most likely the formula is failing in the player.  Not so much the toggle concept and how to kick that off.  

    If there is an error in your patching in that toggle (play time vs design time), that would be what I would focus on.

  • vsslasd Profile Picture
    349 on at

    I made this very simple, so I could see what was happening:

     

    Created a PatchScreen.

    Added a Toggle to the Screen with a default value: runRoutine

     

    On the OnCheck property:

    Set(runRoutine, false);

     

     

    On my main screen, created a button

    On the OnSelect property:

    Set(runRoutine, true)

     

    I have a rectangle whose Visible property is set to runRoutine.

     

    I click the button in the Developer Runtime mode.

     

    The Pop Up appears very quickly and disappears, as expected.

     

    On the Mobile Phone App and the Desktop Player App.

    The Popup window appears but does not ever disappear, and it should.

     

    The code is very simple. That's all there is to it.

     

    It works correctly in the Developer Runtime, but not the others, unfortunately.

     

     

     

  • vsslasd Profile Picture
    349 on at

    So I'm wondering if there is something in the "App Settings" configuration that needs to be set.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @vsslasd 

    Hmmm...got me wondering now.  I don't see that behavior in any of our apps, so let me do a little experimenting and see if there is something that might impact that action.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard