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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Text Input Box On chan...
Power Apps
Unanswered

Text Input Box On change code not working

(0) ShareShare
ReportReport
Posted on by 2

I have a gallery, outside the gallery, I have put an Text Box TextInput1, On it value property I put:

Sum(Gallery1.AllItems,LineNo)
To get the total of the column of the gallery - This is working fine.
 
On change event of of the TextInput1, I want the to get the command button clicked, So I put the code 
Select(Button1)
So that when the total of the gallery, changes, the button will get clicked.
 
total is changing but code is getting triggered.
Please advise any other way to obtain the trigger
Categories:
I have the same question (0)
  • bengo83 Profile Picture
    159 on at

    So far I only know the TextInput trigger if you change the field manually. What do you want to achieve with this trigger?

  • MIA27 Profile Picture
    2 on at

    on button click there is a big code, which converts numbers to text

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @MIA27,

    I think you misunderstand the OnChange property for TextInput.

    OnChange property of the TextInput will be triggered only when the self control is changed, not the way you change it based on another control.

     

    In other words, even though total number for TextInput1 is changing, the Select() command on OnChange property will not be triggered unless you input something in TextInput1 itself and make the control change.

     

    Since you want to convert numbers to text on button click, I think you could directly convert it if the number is the total number from the Gallery, which should be

    Text(Sum(Gallery1.AllItems,LineNo),"[$-en-US]#.0")

    This is an example getting a value with one decimal.

  • MIA27 Profile Picture
    2 on at

    Thank you for reply. 

    I noted, how the property is getting triggered of the text box control.

     

    But,

    The situation is different than what you have understood of the requirement result.

    What you show in the code, is for Formatting of text.

    But  my code behind the command button click is doing is if the TextInput1 value is 123813.43

    The result on the command button click bring the result

    One Hundred Twenty Three Thousand Eight Hundred thirteen and 43/100.

     

    As it is a lengthy and complicated code and design of the code is that On click/On change event only it works as it creates variable, so Knowing that on change of TextInput1 will not work till manually change, so I thought the value change of the text box can trigger a command button.

     

    At the end my requirement is to run the command button on the value change of the Textinput1.

     

    Please guide if any other approach can be done.

    Regards

     

     

  • bengo83 Profile Picture
    159 on at

    Hi @MIA27 

    Thanks for the reply 🙂 I see two ways to solve your problem:

    1. Timer
      You can use the 'onTimerEnd' Trigger from a timer control to check changes on the text field. With 'onTimerStart' you set a variable to the textinput value and 'onTimerEnd' you can check if the value in the text inputfield is different as the value in the variable.
    2. ComponentCreate a new component with a custom custom property. Then set the "raise on reset when value changes" checkbox in this user-defined property. Now you can define your code in the onReset property of the component.

      bengo83_0-1711437155801.png

       

    I hope its help.

     

    Best regards

    Beny

  • MIA27 Profile Picture
    2 on at

    Dear Bengo,

    Thank you for your reply.

    I am using Power App for Teams and also not familiar with components making and using it.

     

    It cannot be solved by the help of 

    WITH()

     

    Actually, the story starts at this page

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-call-a-text-input-s-onChange-action-manually/td-p/958163/page/2 

     

    Where I found the code to convert the digit into words - as I wanted to use my total of gallery to be converted into words for Invoice as the requirement.

     

    That code mentioned there  has lot of mess  code, from which, I was able to make the code into 1 complete code, which run successfully and convert the digits into words

    BUT the issue remains on change event or click event only can work.

     

    Therefore was looking for an alternative any other way work around to solve this.

     

    On the same web page, one of the user mentioned that he solved it by 

    WITH() function.

     

    Posted question in another thread, no reply from any one.

    so, was looking for another solution.

     

    If you can, please review the page, and see some thing can be done. 

    As each invoice and delivery note need the digit in number as well as in words.

     

    Regards

     

     

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard