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 / Default date is Today(...
Power Apps
Answered

Default date is Today() if new form else is ThisItem.Date

(1) ShareShare
ReportReport
Posted on by 181

I have a sharepoint list and have created a powerapp with this list. One of the items in the form is a date. I did have the default for the date set as Today(). However, I have come across the issue where when a user edits the item, the date in the form is still todays date even if the date may be different in the original item. As an example, the image to the left shows the details of on of the items, notice the date is 18/09/19. When I press the edit button at the top, it opens the screen on the right hand side and that date has changed to the default value which is todays date. Then if I save the item, it changes the date. Is there a way to set the default to only be Today() if it is a new form but if it is an edit then it is ThisItem.DateofInteraction.image.png

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Amber_L 

    Yes, there is a way.  To show Today's date if the form is new mode and the saved date when the form is in edit mode put this code in the Default property of your DataCard for DateOfInteraction

     

    If(your_form_name.Mode=New,Today(),ThisItem.DateOfInteraction);

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

  • Amber_L Profile Picture
    181 on at

    That works perfect! Thank you

  • AraMS Profile Picture
    3 on at

    This post was very helpful. I tried using the solution provided, however, there may have been an update and the logical test is no longer working with the current version of Power Apps. Instead, I used this:

    If(your_form_name.Mode=FormMode.New,Today(),ThisItem.your_field_name)

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard