Skip to main content

Notifications

Community site session details

Community site session details

Session Id : MmktmkTtsO6CzP1bzN9W/I
Power Apps - Building Power Apps
Answered

Textbox - After Change instead of onchange

Like (0) ShareShare
ReportReport
Posted on 29 Jan 2024 07:25:36 by 518 Super User 2025 Season 1

Hello,

I have a gallery bound to collection.

Is there a way to implement an Afterchange (or maybe lostfocus, or something like this) event for a textbox?

The reason is that i want to change another value in the collection, depending on some restrictions.

The important columns are here "stunden" and "stunden_faktura".

If i change "stunden" and "stunden_faktura" is 0, than "stunden_faktura" should get the value of "stunden"

 

If i use the onchange event of the texbox stunden to do the following:

If(Value(txt_stunden_faktura.Value)=0,
        Patch(col_Tat,
                 LookUp(col_Tat ,cr8ec_tatigkeitid=GUID(ThisItem.cr8ec_tatigkeitid)),
                 {
                 cr8ec_stunden_faktura:Value(txt_stunden.Value)
                }
)
,false); 

 

Then it start patching during i enter the value in the textbox stunden, but it should wait until i leave the textbox.

If you type very qucik it works but in normal use the value of stunden_faktura gets updated before the entering in textbox stunden is finished

Categories:
  • SLMR Profile Picture
    518 Super User 2025 Season 1 on 29 Jan 2024 at 08:42:13
    Re: Textbox - After Change instead of onchange

    I just inserted a classic textbox, but it executed the onchange event during typing, in the same way the modern control did.

    I am working with a custom page in a model driven app. Maybe this behaives in another way than the pure canvas app?  

  • v-mengmli-msft Profile Picture
    on 29 Jan 2024 at 08:30:32
    Re: Textbox - After Change instead of onchange

    Hi @SLMR ,

     

    Classic text input runs the formula on OnChange after you're done typing and tapping elsewhere on the screen, which is different from modern text input.

     

    If you want to change the way modern input controls work, I'm afraid it's unlikely. I recommend you add a "Submit" button and put the formula on the button's OnSelect property.

  • SLMR Profile Picture
    518 Super User 2025 Season 1 on 29 Jan 2024 at 08:02:37
    Re: Textbox - After Change instead of onchange

    Thnkas for the quick answer.

    But there is no onunfocus event

    SLMR_0-1706515318667.png

    I am working with a custom page (canvas app) in a model driven app

  • SLMR Profile Picture
    518 Super User 2025 Season 1 on 29 Jan 2024 at 08:01:27
    Re: Textbox - After Change instead of onchange

    Thanks for the quick answer.

    But it does not change the behaivior

  • Verified answer
    v-mengmli-msft Profile Picture
    on 29 Jan 2024 at 07:53:51
    Re: Textbox - After Change instead of onchange

    Hi @SLMR ,

     

    Are you using modern control?

    Please replace it with classic textinput control.

     

    Best regards,

    Rimmon

  • mmbr1606 Profile Picture
    12,147 Super User 2025 Season 1 on 29 Jan 2024 at 07:49:18
    Re: Textbox - After Change instead of onchange

    hey @SLMR 

     

    can you please try something like this:

     

     

    // This is the Onselect event of the txt_stunden text box
    If(
     Value(txt_stunden_faktura.Text) = 0,
     Patch(
     col_Tat,
     LookUp(col_Tat, cr8ec_tatigkeitid = GUID(ThisItem.cr8ec_tatigkeitid)),
     {cr8ec_stunden_faktura: Value(txt_stunden.Text)}
     )
    );

     

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 20

#2
BCBuizer Profile Picture

BCBuizer 10 Super User 2025 Season 1

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

Overall leaderboard
Loading started