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 Apps
Unanswered

Variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have 2 screens; one with a text box and a button which navigates to another screen; and one with a search box. I want the search box to read what is in the text box on the same screen as the button. I have set variable and when I navigate to the other screen the search box has the text I want for a millisecond, then disappears.

 

Any ideas?

 

Thanks,


Liam

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    You will need to post the onselect for the button, as well as the text value for the search box control so people know where you went wrong

  • Spamrancher Profile Picture
    345 on at

    I'm assuming when you say "search box" you mean a combo box control. How are you setting the variable and how are you applying it within your search box? If it were me I would be setting the variable in the OnChange property of the text box and setting the Default property of the combo box to be the text. But that might not work depending on what the Items are for your combo box. 

  • PaulD1 Profile Picture
    2,914 on at

    Does the OnVisible of your second screen contain any commands that would reset the variable or the 'search box'?

    As a tip, try to use context (UpdateContext) variables (rather than SET global variables) wherever possible (always use the most limiting scope possible). You can pass a context variable as the third (optional) parameter in a Navigate function to pass a value into the screen being opened.

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

    @Anonymous 

    Consider skipping the variable and just reference the control from the screen you are navigating to.

    Controls in PowerApps are all global, and you can retrieve their values from anywhere.

    So on your other screen, using yourSearchTextControl.Text will return whatever is in that control.

     

    I hope this is helpful for you.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard