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 / date picker defaults b...
Power Apps
Unanswered

date picker defaults back to today's date after an error is encountered while submitting

(0) ShareShare
ReportReport
Posted on by 30

Hello

 

I have a date picker field which uses below formula for the default property. If the form is in new mode the date automatically defaults to today's date. But when I clear the date using the clear button and then change the default date by picking a date from the calendar followed by an error on submission of the form then the date field defaults back again to today's date. This happens only when the error is encountered, which I dont want to happen. How can I avoid this behavior?

 

If(MakeBlank1,Blank(),If(EntryTypeVar="New",Today(),Parent.Default))

 

Clear button On Select property

 

UpdateContext ({MakeBlank1:true});Reset(DatePicker6)

 

Reset button On Select property

 

UpdateContext ({MakeBlank1:false});

 

 

 

On success property of the form has below formula

UpdateContext({MakeBlank1:false});

 

On failure property of the form has below formula

UpdateContext({MakeBlank1:false});

 

On reset property of the form has below formula

UpdateContext({MakeBlank1:false});

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Hi @msv ,

    You would need to reset EntryTypeVar on error as if still true will set the date to Today.

     

    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.

  • msv Profile Picture
    30 on at

    Thank you for your reply. Do you mean I need to tweak the above formula that I used. Can you please elaborate with the tweaked formula so that I can relate?

  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    @msv ,

    I cannot see your model, so I do not know where you want the EntryTypeVar retaining its value, but one certainly needing resetting is the on failure of the form

    UpdateContext(
     {
     MakeBlank1:false,
     EntryTypeVar:Blank()
     }
    )

     

    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.

  • msv Profile Picture
    30 on at

    I tried above it did not work. I have set the EntryTypeVar on start to New. This is a global variable to set the form to new or edit mode

     

    Set(EntryTypeVar,"New");

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard