web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Start to search only w...
Power Apps
Unanswered

Start to search only when the user has finished typing and the textinput control loses focus?

(1) ShareShare
ReportReport
Posted on by 8

In Power Apps, how can I make a text input control execute an action, such as a search, only when the user has finished typing and the control loses focus?

I've already selected "FocusOut" for the text input control's TriggerOutput property. According to Microsoft's description, TriggerOutput has three options:

  • FocusOut: Triggers OnChange only when the text input control loses focus. This is the default option.

  • Delayed: Triggers OnChange after a half-second delay. Useful for delaying expensive operations until the user completes inputting text.

  • Keypress: Triggers OnChange immediately as the user types.

Based on my understanding, "FocusOut" should be the behavior I want. However, even after selecting "FocusOut," the search is still being executed with every character typed (similar to the "Keypress" behavior), which significantly impacts performance.

Consider the following example: there is a text input control (name: inputEmail) and a label(name: resultName) control. After I input a user's email address into the text input, the label displays the user's name.

Here's my setting.

resultName.text = Office365Users.UserProfileV2(inputEmail.Value).displayName

The problem is that every time I type a letter into the text box, it throws the following error saying it can't be found (that's because I haven't input the whole email address yet.), until I finish typing the correct email address.

Office365Users.UserProfileV2 fail: { "error": { "code": "ResourceNotFound", "message": "User not found", "innerError": xxxxxxxx} }

And the following setting also result the same issue: Set OnChange property of inputEmail as

UpdateContext({v_resultName:Office365Users.UserProfileV2(inputEmail.Value).displayName})

Then set the Text property of Label

resultName.Text = v_resultName

How can I make it so that the search only starts when I finish typing the entire address / move my focus away from the text box? thanks.

 
I have the same question (0)
  • BhargavPatel Profile Picture
    660 Moderator on at
    Change the Text property of the resultName label to: 
    First(Office365Users.SearchUserV2({searchTerm:inputEmail.Value}).value).DisplayName
    Also, make sure the "v" is lower case for the second time the world value appears in the code above. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard