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 / Clear text input when ...
Power Apps
Unanswered

Clear text input when editing existing data

(0) ShareShare
ReportReport
Posted on by 9

Hi,
This is a form in editing mode of existing record. Please help me to code Clear-button so it clears the text "Ris, bbq chunks" which is fetched from data source.
Kudratilla_0-1697573348869.png

 

I tried below but didnt succeed:
Solved: Re: Clear all input fields in PowerApps - Power Platform Community (microsoft.com) 

Set the Reset value of the fields to a Variable (varReset will do) then use when you want to reset.

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

 

Categories:
  • BrianKennemer Profile Picture
    69 on at

    This vide at 15:51 covers how to do what you are asking about. 

    https://youtu.be/76RJyaoW0BQ?t=891

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Kudratilla - could you apply the below to a Button control,

     

    UpdateContext({ctxReset: !ctxReset});

     

    and then apply the below onto the Reset property of that field:

     

    ctxReset

     

    If you want the field to be blank, apply the below to the Default property of the DataCard (not the DataCardValue)

     

    If(
     ctxReset,
     Blank(),
     ThisItem.'Your Field'
    )

     

    Depending on how you're populating the Form, (e.g. via a Gallery selection), you may also want to include the below on the OnSelect property of the Gallery:

     

    UpdateContext({ctxReset: false});

     

  • Kudratilla Profile Picture
    9 on at

    Thank you Imran-Ami,
    I used your codes as instructed (inside button.OnSelect, TextField.Reset and Gallery.OnSelect) and I am only able to reset the field instead of making it blank
    So, if the field had a text "ABC" and when I change it to "ABCD" then your code resets it back to "ABC", but what I want is to be blank.

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Kudratilla - I am not sure if you fully read my solution. There is a section in my response which mentions what to do if you want to display blank.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard