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 / Set date field in cust...
Power Apps
Unanswered

Set date field in custom form when Choice is changed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, 

 

I am trying to populate Date column based on the "Status" choice column.

Condition is If Status = Complete or Cancelled populated date = Now(), Whenever the status is changed either from Complete or Cancelled it should set the date column to blank. 

 

So far, the logic works  on my editable form. whenever it toggle for complete or cancelled the date populates and Status <> Closed or Complete it blanks the Closed date.

Rushi555_2-1695242578790.png

 

But when I submit() the ticket and view in the gallery its doesn't reflect.

Rushi555_3-1695242891320.png

 

 

 

I have the following code on the default date field for "Closed Date" Card. 

If(DataCardValue46_2.Selected.Value="Cancelled",Now(),If(DataCardValue46_2.Selected.Value="Complete",Now(),If(DataCardValue46_2.Selected.Value<>"Complete",Blank(),If(DataCardValue46_2.Selected.Value<>"Cancelled",Blank())))) 

 

Thanks for any help!

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please tell me what does not reflect? I saw that the Closed Date is blank when the Status is Completed.

     

    What's more, if you want to populate the closed date with today when status dropdown is Cancelled or Completed, please try the following formula:

    If(DataCardValue46_2.Selected.Value="Cancelled"||DataCardValue46_2.Selected.Value="Complete",Now(),DataCardValue46_2.Selected.Value<>"Complete"||DataCardValue46_2.Selected.Value<>"Cancelled",Blank())
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Qi,

    So the code work in the form, but when submit it the changes doesn't reflect on the source which is SharePoint list. 

    Code publish the closed date(Date column) based on the selected status. But It doesn't delete the value on closed date(Date column).

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please try to enable the Formula-level Error Management in Power Apps setting?

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard