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 / How to erase the chara...
Power Apps
Answered

How to erase the characters entered in the text box

(0) ShareShare
ReportReport
Posted on by 86

Hi all,I want to initialize (blank) the value entered in the "TextInput" when the "Button" is pressed.

 

Could you please tell me how?

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,242 Most Valuable Professional on at

    Hi @Bird ,

    Make the Reset of the Text box a Variable (I will use varReset here) and on the Button OnSelect

    UpdateContext({varReset:true});
    UpdateContext({varReset:false})

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Bird Profile Picture
    86 on at

     

    UpdateContext({varReset:true});
    UpdateContext({varReset:false})

    is described in OnSelect of the Button,

    Where and what should I write in TextInput?

  • WarrenBelz Profile Picture
    155,242 Most Valuable Professional on at

    Hi @Bird ,

    As I posted - the Reset of the Text box needs to be 

    varReset

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Bird Profile Picture
    86 on at

    Thank you for doing it.

    By the way, is it possible to reset it 3 seconds after the button is pressed?

  • WarrenBelz Profile Picture
    155,242 Most Valuable Professional on at

    Hi @Bird ,

    Only with a Timer Control -

    OnSelect of Button

    UpdateContext({varTimer:true});
    UpdateContext({varTimer:false})

    Start of Timer

    varTimer

    Timer OnTimerEnd

    UpdateContext({varReset:true});
    UpdateContext({varReset:false})

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Bird Profile Picture
    86 on at

    Hi @ ,

     

     

    UpdateContext({varReset:true});

     

     

    If only, the timer will work.

     

    but,

     

     

    UpdateContext({varTimer:true});
    UpdateContext({varTimer:false})

     

     

    If I put both in, the timer will not run.

    What should I do?

     

  • WarrenBelz Profile Picture
    155,242 Most Valuable Professional on at

    Hi @Bird ,

    I am a bit lost here - what code are you putting in the Timer and where are you putting it ?

  • Bird Profile Picture
    86 on at

    Hi @ ,

     

    timer1 in an empty area.

    OntimerStart of timer1 is

    varTimer

     

    OnSelect of Button

    UpdateContext({varTimer:true});
    UpdateContext({varTimer:false})

     

  • WarrenBelz Profile Picture
    155,242 Most Valuable Professional on at

    Hi @Bird ,

    You need the code on Start, not OnTimerStart

  • Bird Profile Picture
    86 on at

    OnSelect of Button

    UpdateContext({varTimer:true});
    UpdateContext({varTimer:false})

    "Start" of Timer

    varTimer

    Timer OnTimerEnd

    UpdateContext({varReset:true});
    UpdateContext({varReset:false})

     

    but, Timer does not count...

     

    And,

    Is it possible to erase the characters in the TextLabel when the timer counts and reaches OnTimerEnd?

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard