Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Clear Text input which has Default earlier

(0) ShareShare
ReportReport
Posted on by 945

Hello,

 

I have a condition whereby my Text Input (lets say the name is TextInput1) having Default : Gallery1.Selected.'Worker name', then in some event, I need to clear that text. So I created a button right beside that Textinput1 to clear that text inside.

 

Usually I'm using Reset(TextInput1) , but I realize reset is just to give the default value back.

 

How to clear the text ?

 

Thanks

Categories:
  • DanishIslam Profile Picture
    108 on at
    Re: Clear Text input which has Default earlier

    Hi Axal,

     

    If i understand correctly, try this approach -

     

    1. Create a boolean variable on screen visible. Set(Clear, false)

    2. Set Default property of textbox TextInput1 to If(Clear, "", Gallery1.Selected.'Worker name')

    3. Now event when you want to clear the text use this code UpdateContext({Clear: true})

    4. You also need to update the Clear variable to false on gallery select event, so that you can have the new value.

     

    Hope this helps.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >