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 / Textbox should be fill...
Power Apps
Unanswered

Textbox should be filled with current date

(1) ShareShare
ReportReport
Posted on by 125

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.

Categories:
  • MaximusDecimus Profile Picture
    281 on at

    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.

  • DavidZoon Profile Picture
    738 Most Valuable Professional on at

    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.

  • Ali_sam Profile Picture
    125 on at

    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

  • Ali_sam Profile Picture
    125 on at

    It should be saved and then auto reset for next record

  • MaximusDecimus Profile Picture
    281 on at

    Are you using a form to submit? 

    Also what is your data source? (SharePoint List, SQL etc...)

  • Ali_sam Profile Picture
    125 on at

    Yes its a form. And i am using SharePoint as datasource

  • MaximusDecimus Profile Picture
    281 on at

    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

  • Ali_sam Profile Picture
    125 on at

    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.

  • CU24070609-0 Profile Picture
    on at
     
    I have tried the steps but it's not working.
    Can you please help?
     
    Thanks.
     
  • CU24070609-0 Profile Picture
    on at
     
    Is it resolved? Can you pls share with me?

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard