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!
That worked! Thank you 🙂
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!
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:
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:
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!
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399