Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

timestamp when changing field

(1) ShareShare
ReportReport
Posted on by 541
trying to time stamp the current time into the Resolved Date field (Datacardvalue1) when the Status field (datacardvalue30) changes to 'Resolved' or 'Resolved - No Call Needed'

  • Suggested answer
    timl Profile Picture
    timl 33,812 on at
    timestamp when changing field
     
    Apologies for the delay in getting back to your last question.
     
    To resolve this, you can set the OnChange property of your status dropdown to this:
     
    If(Datacardvalue1.Text = "",
       Reset(Datacardvalue1)
    )
     
    By doing this, it won't be reset if there's already a value.
  • joel914823 Profile Picture
    joel914823 541 on at
    timestamp when changing field
     timl   any help on this would be greatly appreciated.
  • joel914823 Profile Picture
    joel914823 541 on at
    timestamp when changing field
    Hello timl,
     
    That is correct.  If update the status  to Resolved - it should capture the current time.    
     
    If later the status is then updated to "Not Started" the resolved date field should still show the time captured previously and not clear out or go blank.
  • timl Profile Picture
    timl 33,812 on at
    timestamp when changing field
    Hi @joel914823
     
    I'm not sure what you mean by this. Can you clarify? 
     
    Are you saying that once the Resolved Date value is set by choosing Resolved or 'Resolved - No Call Needed', subsequently changing the value in the dropdown should not change the value in Resolved Date?
  • joel914823 Profile Picture
    joel914823 541 on at
    timestamp when changing field
    Hello timl,
     
    Is there a way that it just captures the time and not reset it - I tried to omit the part where it resets but seems that when we change the status - it then clears out the field back to blank.  
  • Verified answer
    timl Profile Picture
    timl 33,812 on at
    timestamp when changing field
     
    On way to do this is to set the Default property of your Resolved Date control to this:
     
    If(
       Or(
          DatacardValue30.Selected.Value = "Resolved",
          DatacardValue30.Selected.Value = "Resolved - No Call Needed"
       ),
       Now()
    )
    Next, set the OnChange property of your status dropdown to this:
     
    Reset(Datacardvalue1)
    This should then reset the date when the dropdown changes.
  • Suggested answer
    Ajlan Profile Picture
    Ajlan 90 on at
    timestamp when changing field
    Hello,
     

    Steps:

    1. Set the OnChange property of the DatacardValue30 (Status field) to check for the status change and update the Resolved Date accordingly.

    2. Use the If condition to check if the Status field has changed to 'Resolved' or 'Resolved - No Call Needed'. If true, set the Resolved Date to the current time.

    Here is the formula you can use for the OnChange property of DatacardValue30:
     
    If(
    Or(
    DatacardValue30.Selected.Value = "Resolved",
    DatacardValue30.Selected.Value = "Resolved - No Call Needed"
    ),
    Patch(
    YourDataSource,
    ThisItem,
    { ResolvedDate: Now() }
    )
    )


    Cheers 🎉

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard