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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How To - TextInput.OnC...
Power Apps
Unanswered

How To - TextInput.OnChange without pressing ENTER key

(2) ShareShare
ReportReport
Posted on by 1,594

Hi all,

Anyone would have an idea of how to trigger the OnChange event of a TextInput control wihtout pressing the ENTER key but by just modifying its content.

I want to use this TextInput control as a filter for a gallery and I want the gallery to filter as the user types characters in the text input control (wihtout having to press the ENTER key).

Thanks,

Emmanuel

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    on at
    Re: How To - TextInput.OnChange without pressing ENTER key

    If the Items property of your gallery references the content of the text input control directly, then it will be filtered based on when the user is typing on it. For example, if you have your gallery Items property set to

    Filter(MyDataSource, StartsWith(MyColumn, TextInput1.Text))

    then you should achieve what you want.

    Hope this helps!

  • R3dKap Profile Picture
    1,594 on at
    Re: How To - TextInput.OnChange without pressing ENTER key

    Hi @CarlosFigueira,

    Yes of course, I know this is possible. But in some cases, we can't reference the label text value directly in the gallery datasource property.

    My post here is rather to outline that some controls don't have their events triggered when they should be as their meaning is clearly specified in the PowerApps editor.

    Here is the example of the checkbox control:

    • the Checked event of a checkbox control is described as is: Behavior run when the visual is checked
    • the event IS triggered when clicked -> OK
    • but if you check it through another control (say, a button using a variable), then the event IS NOT triggered even though IT IS checked!

    I'm having a hard time finding some sense in this behavior... What's your (or others) opinion on this ?

    Emmanuel

  • joguerre Profile Picture
    Microsoft Employee on at
    Re: How To - TextInput.OnChange without pressing ENTER key

    Hey @R3dKap  I was facing the exact same problem but I have found a quick hack to activate the filter, in my case I want to hide a search gallery when then string in the text field is empty and show the results when they are some to show. Also I didn't want the user to need to press enter to run the search queries, so what I have is an IF function that checks the Len of Text in the Text Input field, this way you could trigger something else, a filter, visible true or false, etc.

     

    Its something like this, but you could add other functions inside, in my case I'm limiting it to 2 characters in the string but it could be > 0:

     

    If(Len(TextInput1.Text) >= 2, true, false)

     

    Hope it works for you, greetings. 

     

     

  • v-guarama Profile Picture
    18 on at
    Re: How To - TextInput.OnChange without pressing ENTER key

    @R3dKap wrote:

    Hi all,

    Anyone would have an idea of how to trigger the OnChange event of a TextInput control wihtout pressing the ENTER key but by just modifying its content.

    I want to use this TextInput control as a filter for a gallery and I want the gallery to filter as the user types characters in the text input control (wihtout having to press the ENTER key).

    Thanks,

    Emmanuel



    You can just insert a slider control, set its defult value to "Len(YourTextField)", and then add to the slider on change the action you want to do in every change in the text field. I tested on my side and works fine.

    Set the slider visible property to false.

  • gjgiraldo Profile Picture
    14 on at
    Re: How To - TextInput.OnChange without pressing ENTER key

    thanks

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard