web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Default date is overri...
Power Apps
Unanswered

Default date is overriding saved value in edit form

(0) ShareShare
ReportReport
Posted on by 106

Hello,

 

We are using PowerApps to create data entry screens for a SQL Server database.

One of our fields in the db is a date field.  I want this field to default to today - which works by setting Default = Today().

The problem is, if I have an actual value in the db (field name is RecordDate) - this default value overrides the actual db value.  

How can I only set the default value to Today() if there is not already an existing value?  Basically, any time user is adding a record the first time only.

 

Appreciate any assistance you can provide,

Dan

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @lesotho_kid ,

    In the DatePicker DefaultDate (I assume that is what you are using, try this)

    If(
     Value(YourDatePickerName.SelectedDate)=0,
     Today(),
     Parent.Default
    )

    or (probably safer) if you only want to set it on new records

    If(
     YourFormName.Mode=FormMode.New,
     Today(),
     Parent.Default
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • lesotho_kid Profile Picture
    106 on at

    Thanks @WarrenBelz  - that worked perfectly!  Appreciate your help

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard