Hi
In my app, i have a blank textbox and a button.
I need functionality that when user click on button. Textbox should autofilled with current date & time .
Currently the date is reflecting in display form after submit but when we are editing that record in edit page that text box is showing blank. I need that should contain the submit time..
Help anyone aware of it.
Actually it is a form. When user submit the form after that when approver open it & approved or denied then this is needed. Then the approved/denied time should be submit.
Okay - so you may have a column in your SharePoint list called Created which logs when then entry was added in. I'm assuming that this is the case, if not then you'd just need to create a time logged column and set it so it defaults to current date/time
Yes its a form. And i am using SharePoint as datasource
Are you using a form to submit?
Also what is your data source? (SharePoint List, SQL etc...)
It should be saved and then auto reset for next record
Working but bot fully. Because its showing the same time for all record by default..
Like i submitted a request before an hour ago, and one is submitted now. Before one is showing current time
Hello,
You have to use a variable and the Text() function :
In your Button.OnSelect : UpdateContext({vCurrentTime:Text(Now(),"dd/mm/yyyy")})
Replace "dd/mm/yyyy" by desired format
In your TextInput.Default : vCurrentTime
You can add a button or an icon to clear the textinput with : UpdateContext({vCurrentTime:""})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily.
Hi @Ali_sam
Set the button OnSelect property to this:
UpdateContext({varTimestamp: Now()})
And the Default property of your text box to varTimeStamp
Every time the user clicks the button the variable will be updated to the current timestamp.