Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Trying to reset a TextInput to Default Value that has a variable as the default value

(1) ShareShare
ReportReport
Posted on by 9

I am creating a check-in/check-out really simple PowerApp. I have a check-in button that reads current time to a TextInput box and then sends that information to a SharePoint list.

 

The problem I'm having is that when I am then going back to the home-screen, the TextInput boxes still have data in them, which would be confusing in the SharePoint list.

 

I have tried Reset(TextInput) - the problem is that the variable VarTimeNow is the default field for this TextInput box. So every time you reset it, it stays as is, which is frustrating! Does anyone know of a way to clear a TextInput box at a click of a button i.e. the submit button once a person is finished? 

 

I can see a clear toggle which introduces an 'X' icon in the text field, but telling people to clear a box before they hit submit will probably happen 50% of the time... Any help would be hugely appreciated thanks! 

  • CU24070609-0 Profile Picture
    on at
    Trying to reset a TextInput to Default Value that has a variable as the default value
    @RyanCoram,
    @LaurensM
     
    It's showing the error when I use the code:
     
  • RyanCoram Profile Picture
    9 on at
    Re: Trying to reset a TextInput to Default Value that has a variable as the default value

    That worked! Thank you 🙂 

  • Verified answer
    LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Trying to reset a TextInput to Default Value that has a variable as the default value

    @RyanCoram,

     

    I don't fully follow why would it override the data if the user has already submitted the data? After the Navigate function you could reset that variable which removes the date within your TextInput.

     

    Alternatively - Should you not want to clear VarTimeNow, you could create a variable to track whether the data was submitted and only show the Default textinput when this variable is set to false e.g. varSubmitted 

    //After submitting (after the nav function)
    Set(varSubmitted, true)
    
    //In the Default property of your TextInput (only show time if it is false):
    If(!varSubmitted, VarTimeNow)
    
    //When a new user wants to see the date (e.g. when navigating to the submission screen)
    Set(varSubmitted, false)

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • RyanCoram Profile Picture
    9 on at
    Re: Trying to reset a TextInput to Default Value that has a variable as the default value

    Unfortunately that over-rides the data completely and doesn't show the time for the short amount of time that it needs to appear.

     

    I am looking to have the data appear like this: 

     

    RyanCoram_0-1689092504299.png

     

    And then upon clicking submit, for the field to be empty or replaced with a string. So that when the next person comes to use it, that data is cleared. 

     

    This is what I have in my submit button as it stands: 

    RyanCoram_1-1689092592694.png

     

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Trying to reset a TextInput to Default Value that has a variable as the default value

    Hi @RyanCoram,

     

    Is it a possibility to reset the variable after submitting the data?

    //Should it be a local var
    UpdateContext({VarTimeNow: Blank()})
    
    //Should it be a global variable
    Set(VarTimeName, Blank())

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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 > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399