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 stamp when a togg...
Power Apps
Unanswered

Date stamp when a toggle is turned on

(0) ShareShare
ReportReport
Posted on by 10

Hi Friends,

 

I have customised a Sharepoint List with Power Apps, and have converted the checkboxes to Toggles. I'd like it to show me the date when a toggle was moved from false to true.

 

I've been using TrueText = Text(Now(), "dd/mm/yyyy") but this returns the date I'm looking at it, not the date that the toggle was moved. How can I get it to return the date the toggle was changed? I've been browsing answers here and also tried this:

SimonInSydney_0-1689563681576.png

 

But it still returns the current date/time, not the date the toggle was modified.

 

Thank you for any help and advice (and sorry if this is a really basic question...I'm learning!)

 

S

Categories:
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    You need to patch the specific column on the OnCheck of the toggle.

    OnCheck: Patch(ListName, RecordToUpdate,{ColumnToStoreDate:Now()})

     

    So whenever the toggle changes to true, it will store that time in the column. and you can fetch it from there.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @SimonInSydney ,

     

     I'd like it to show me the date when a toggle was moved from false to true.

     

    Please try:
    Set the toggle's OnCheck property to:

    UpdateContext({timestamp:Now(),showing:true})

    Set the toggle's OnUncheck property to:

    UpdateContext({showing:false})

    Clear the toggler's OnChange property

     

    Best Regards,

    Bof

     

  • SimonInSydney Profile Picture
    10 on at

    Thanks for this reply, but this still shows the date/time that I am looking at the data, not the time that the toggle was moved.

  • SimonInSydney Profile Picture
    10 on at

    I'm afraid there's steps here I don't understand. Can you talk me through it?

  • SimonInSydney Profile Picture
    10 on at

    Thanks for this reply, but this still shows the date/time that I am looking at the data, not the time that the toggle was moved.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @SimonInSydney ,

     

    Please replace the 

    Patent.Default

    with

    If(
     showing,
     timestamp,
     Patent.Default
    )

     

    Best Regards,

    Bof

  • SimonInSydney Profile Picture
    10 on at

    Hi again, I'm sorry but that is producing an error:

    SimonInSydney_0-1689572388881.png

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @SimonInSydney ,

     

    Could you please show me what the error message is?

     

    Best Regards,

    Bof

  • SimonInSydney Profile Picture
    10 on at

    Hi there: here is how it looks and this is the error it is returning,

     

    SimonInSydney_0-1689573964345.png

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @SimonInSydney ,

     

    It is a toggle, it only allows boolean value.  Where do you want to show the time? A label control? Or a textinput control? Where it is ? Could you please show me some screenshots?

     

    Best Regards,

    Bof

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard