Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Re: Run search when press enter

@Meneghino wrote:

Hi @Oz


Glad that you are now finding your way around.  As you can see from the OnSelect proerty of the search icon, what it does is to:

1) Load the search term into a collection called "SearchUser"

2) Navigate to the SearchScreen where the results are displayed


One alternative is to place the code that is in the OnSelect of the search icon in the OnChange property of the text input, but the problem is that it will probably be triggered every time a user enters a letter.


The solution I would suggest, if this can work, is to place the text input in the same screen as the gallery.


Then you can simply use this as the Items property of the gallery:



If(Len(TextInputSearchEmployee.Text) > 0, Sort(Filter(Office365Users.SearchUser({searchTerm:TextInputSearchEmployee.Text}), Len(GivenName) > 0), GivenName, Ascending))


If you decide to name the text input something else, then just substitute that name for TextInputSearchEmployee


I am suggesting this so that you avoid the navigation step, which is why a search icon is necessary.


If performance is bad, then you can try to set the DelayOutput property of the text input to true or false.  If false then it will search as soon as any change is made to the text, but may make the app hang a bit.  If true then it will wait, so that it will not search immediately but will hang less.


Hope this helps.


Any chance there is another workaround to use the front-facing search box and have the key enter or return start the search off?  Considering we want to push this out to mobile users sometimes it gets covered by the keyboard.  To combat the covered issue, I moved it up and added a label for them to click the magnifying glass after entering their text.

Perhaps the use of Rules?  I am using rules to highlight the text and change the button color, just to help nudge them forward.


Thank you for any input, very new to this but loving the concept so far.

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 204 members 5,349 guests
Please welcome our newest community members: