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 / How can I over-ride a ...
Power Apps
Unanswered

How can I over-ride a date column in a form whenever a second date column has data?

(0) ShareShare
ReportReport
Posted on by 523

I have a datepicker on the form "datevalue1" based on a CDS column "Approx Close Date" and I have a datepicker on the form "datevalue2" based on a CDS column "Actual Close Date."

Both these columns are optional.

When a user submits the form initially, they would enter an approx close date in datevalue1 (and leaving datevalue2 empty)... and nearing the time it closes, they enter the actual close date in datevalue2.

What would be a good way to have the value in datevalue2 duplicated into datevalue1, but only when datevalue2 contains data?

I hope that makes some semblance of sense, thx!

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Am assuming that both datepickers DefaultDate is Blank(). If that is the case try this code in the DafaultDate of Datepicker2;

     

    If(Form1.Mode = FormMode.New && !IsBlank(DatePicker1), DatePicker1.SelectedDate)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Medoomi Profile Picture
    523 on at

    Both datepickers DefaultDate is Parent.Default

    Does the following code for DefaultDate in Date Picker DateValue1 seem like it would work:

    If(!IsBlank(DateValue2),DateValue2.SelectedDate,Parent.Default)

    What I am hoping it would do, is allow any date to be selected so long as DateValue2 is empty (whether the form mode is new, or edit)... and if DateValue2 has a date, that it would enter that date in DateValue1

    Thanks so much!

  • eka24 Profile Picture
    20,923 on at

    If there is a defauldate, then it cannot be blank. So look at the formula again. 

    If that should work, on Change the default date to;

    If(Form1.Mode=FormMode.New,Blank(), Parent.Default)

     

    Then you can use your formula stated.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Medoomi Profile Picture
    523 on at

    Thanks so much @eka24 

    I am still trying to understand your suggestion.

    If I set the Default Date of the Date Picker to

    If(Form1.Mode=FormMode.New,Blank(), Parent.Default)
    The parent of this Date Picker is the Card, and its Default is set to

    ThisItem.'Approx Close'
    Would that not already create a blank new record when the form mode is new? Or is there another reason why On Change of the Date Picker should also be set to

    If(Form1.Mode=FormMode.New,Blank(), Parent.Default)
    Apologies for my slowness, thx!

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard