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 / Selective screen reset...
Power Apps
Answered

Selective screen resets depending on navigation source?

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have an app that has a search box on the screen, there is a gallery that reacts to the words that are entered into the search box.  When the screen loads I reset the search box so it hides the gallery and the user has a clean interface to search from.  The items in the gallery have a button that navigates to another screen, this new screen uses the selected item from the search screen to display data.  All straightforward so far.

 

Now the complicated bit, I want to change the on visible of the search screen to react differently depending where the user has navigated from.  By this I mean if the user clicks a button from a different page within the app to go to the search page it will load and reset the search box so that the interface is clean.  However if the user has performed their search and clicked on an item and presses a "Back" button it should return them to the search screen but this time it doesn't execute the reset on the search box so their previous search results are still visible.

 

I've been playing with UpdateContext but this doesn't appear to work across screens, or at least I can't get it to work across screens.

 

Any help or thoughts gratefully received.

Rob

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rob_CTL 

    You can actually utilize the context variable for this.  If your search screen uses a context variable such as lclResetScreen to determine if the screen should be reset, then you can pass this back from another screen.  You can't use the Back() function on your other screens, but you can use the Navigate to do so.

    Ex.  Navigate(yourSearchScreen, None, {lclResetScreen:false})

    This will set the context variable on the search screen to false.

    Perhaps you can work this into your thought process.

     

    I hope this is helpful for you.

  • Rob_CTL Profile Picture
    on at

    @RandyHayes ah, lightbulb moment - thanks that really helped point me in the right direction

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard