cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FreddieV
Resolver I
Resolver I

Transfer text from searchbox to a form field?

Simple query. May not be possible. Searching has turned up zero results, though I may not be using the correct terminology.

 

I'm building an app where people ask questions. I have a search box where people can input a question that they have and it then searches a gallery on that same page to see if their question has been asked already. If nothing is found, they can click a button on that page that takes them to a form on a new screen to actually submit their question.

The ask: Is there a way to setup the app so that if the question they partially input into the search box could be transferred to the question form on the other page (upon button click) so that they don't have to type it out again? Is this possible in PowerApps?

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for the reply. It was helpful, but only up to a point. A few things, and this if partly for anyone who comes across this post going forward.

  1. I've never used a global variable before (obviously), so it wasn't clear from your post where I should have 'saved the value' before I set it as the OnSelect property of my button. The first part confused me!
  2. The .Text portion of the code isn't necessary, as PowerApps throws up an error. You can literally just reference the name of the Search Box without the .Text portion
  3. Instead of using it as the default value of the FORM, it should be that you set it as the default value of whatever FIELD WITHIN THE FORM that you wish for the text to appear. You do this simply by typing 'YourVaribaleNameHere' no text before or after.

I used this helpful YouTube video to understand Global Variables to begin with: https://youtu.be/mCj1X6KRYew

View solution in original post

2 REPLIES 2
cpadilla
Helper II
Helper II

Hello!

 

Yes, it can be done via Global variables.

  1. Save the value. Set this on the OnSelect of your button.

 

Set(varSerachBoxText, YourTextInput.Text)​

 

  • Use it as the default value of your Form

 

Hope this helps

Thanks for the reply. It was helpful, but only up to a point. A few things, and this if partly for anyone who comes across this post going forward.

  1. I've never used a global variable before (obviously), so it wasn't clear from your post where I should have 'saved the value' before I set it as the OnSelect property of my button. The first part confused me!
  2. The .Text portion of the code isn't necessary, as PowerApps throws up an error. You can literally just reference the name of the Search Box without the .Text portion
  3. Instead of using it as the default value of the FORM, it should be that you set it as the default value of whatever FIELD WITHIN THE FORM that you wish for the text to appear. You do this simply by typing 'YourVaribaleNameHere' no text before or after.

I used this helpful YouTube video to understand Global Variables to begin with: https://youtu.be/mCj1X6KRYew

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,291)