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 / On Change - Timestamp
Power Apps
Answered

On Change - Timestamp

(0) ShareShare
ReportReport
Posted on by 240

Hello All,

 

I would like an OnChange property of a Dropdown to both Patch the Dropdown it relates to but also a separate date picker that will act as a timestamp - logging when a change is made.

 

The OnChange of my Dropdown1 is currently the below:

Patch(tbl_App,Gallery2.Selected,{Qualification:Dropdown1.Selected.Value})

 

Please could you advise on how to amend this formula to also include a saving of my timestamp date picker which is named 'DatePicker3'.

 

Many thanks

Chris

Categories:
  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    Hi!

     

    You'll want your final function to look like:

     

    Patch(
     tbl_App,
     Gallery2.Selected,
     {Qualification:Dropdown1.Selected.Value, Timestamp: DatePicker3.SelectedDate}
    )

     

    This will keep the value of datepicker as a column timestamp. 

     

    However, there's a couple things to note here:

     - You'll most likely have to make the column in your datasource before you add this to the patch function.

     - Depending on your datasource, it may even have a column like this already. 

     - As an alternative to using the datepicker(which doesn't store times, only dates), you can look into using the Now Function

     

    Hope this helps!

  • CC-19121430-0 Profile Picture
    240 on at

    Hello @madlad,

     

    Hope you are well.

     

    Thank you very much, that's great and works perfectly for Dropdowns!

     

    Could you possibly just assist me with something else, in that i would also like this to happen for a change made on a datepicker to prompt the timestamp in DatePicker3. And also what the formula would be for a text input on change to trigger my timestamp.

     

    The OnChange of my Datepicker is currently:

    Patch(tbl_App,Gallery2.Selected,{'Training Start Date':DatePicker1.SelectedDate})

     

    The OnChange of my Textinput is currently:

    Patch(tbl_App,Gallery2.Selected,{'Funding Band':TextInput1_1.Text})

     

    Many thanks

    Chris 🙂

  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    Hi @Appy1 

     

    It looks like these formulas both should just need the same addition as the prior formula:

    Patch(
     tbl_App,
     Gallery2.Selected,
     {'Training Start Date':DatePicker1.SelectedDate, Timestamp: DatePicker3.SelectedDate}
    )
    Patch(
     tbl_App,
     Gallery2.Selected,
     {'Funding Band':TextInput1_1.Text, Timestamp: DatePicker3.SelectedDate}
    )

    This will store the date with them.

     

    Hope this helps!

     

    As a brief side note, if you're problem is resolved if you could mark the answer as solution so others can find it easier in the future 🙂

  • CC-19121430-0 Profile Picture
    240 on at

    Thank you very much!!! 🙂

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard