Hello i have an application that has 1 input field
1 button and a gallery.
I have made a actions that says that show images in the gallery based on what the user types in the Input field. Problem its that this happens real time, so i want to move the trigger to the button.
The user types in text into the inputfield then hit the button then the result will show in the gallery. How can i move the trigger to happend when the user hits the button ?
PowerApps evaluates all formulas in real time. So, if your Gallery Items property is doing a search based on the text in the TextInput control, then it will evaluate as someone types.
In order to do a "click to search", you need to take a snapshot of the value in the TextInput control. In PowerApps, you can snapshot a value by using a variable as it will not change until you change it.
So, for example, in your button, set a variable to the textinput value: UpdateContext({searchTerms:TextInput1.Text})
And then change your Items property on the Gallery to utilize the searchTerms variable instead.
So, not knowing your control names or formulas, substitute the above with the proper textinput control name and then in your Items formula, replace TextInput1.Text (or whatever you called that control) with searchTerms
I hope this is helpful for you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
264 | |
91 | |
78 | |
68 | |
67 |