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 / Help with Timestamping...
Power Apps
Answered

Help with Timestamping date/time & User after toggle press

(0) ShareShare
ReportReport
Posted on by 26

Hello,

 

I have a yes/no (DataCardValue1) toggle that when pressed I would like for 1 text box (textinput1) to show the date and time "dd mmm yy  hh:mm" (Time in a 24 hour format) and another box (textinput2) to show the user name of the person who pressed the button.

 

Is there any way to do this? I had a solution earlier that almost worked but every time I went to edit the entry it re-updated the time which didn't really work for me (I'd only want an update after the toggle was pressed).

 

Can anyone help?

 

Thanks

 

Aaron

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! 

    To show you need to save it in a collection or a SPList or something.

    If you use sharepoitn, ypu have the field "created" that will show the date when pressed and teh "Created by" that will show the name. So, my advice is save it in a SP list

    If this do not solve your question, give m e more info about the button

  • Azbo6587 Profile Picture
    26 on at

    My apologies - I should have been more descriptive. Please see my screenshot attached.

     

    I'm customizing a form for a Sharepoint 'Stock Items Requisitions'. What I expect, is that people will periodically access a record and click a toggle - and there'll be upto 10 toggles on the screen at any one time. Each line is a material type requiring for stock to be 'picked'. Different users will access each record at different times and systematically 'toggle' them off until everything is toggled (Pick completed) and the record will close.

     

    What I need is for when each toggle is pressed, it sets a timestamp in a single line of text field (Picked Time 1, Picked Time 2 etc.) and a username in a different single line of text field (Picked by 1, Picked by 2 etc.)

     

    Are you able to help with that please?

     

    Thanks

     

    Aaron

    Capture.PNG
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey

    Okay, so, you still have to save it in the cloud so other users can see. Thrn, On select proeprty,you can use the Modified on or have a field in your cloud to store the date. That date will be stored like: Now() or Today()

     

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Azbo6587

     

    • On the Toggle button, set the OnCheck property set to
    • Set(CurrentTime, Now())
    • Set UnCheck Property to
    • Set(CurrentTime, Blank())

    Text Contol on the form

    Set Default property to 

     

     

    If(IsBlank(DatacardValuex.Value),CurrentTime, Parent.Default)

  • Azbo6587 Profile Picture
    26 on at

    Thank you for the help! That worked

  • Eeyore2005 Profile Picture
    119 on at

    Hello @StalinPonnusamy ,

     

    Could you please advise why your solution does not work for me?

    My toggle is called "Toggle_Change to New" and I need the timestamp when and the person who checked the toggle have in two different text fields ("Saved as New" and "Person Saved as New").

     

    Toggle_Change to New:

    On Check property: Set(timestamp,Now()) && Set(PersonCreated,User().Email)

    On Uncheck property: Set(timestamp, Blank())

     

    Text control "Saved as New":

    Default property: If('Toggle_Change to New'.Value,timestamp, Parent.Default)

     

    Text control "Person Saved as New":

    Default property: If('Toggle_Change to New'.Value,PersonCreated, Parent.Default)

     

    But every time when I edit the item, the timestamp changes again and I just need to have the timestamp on when the status changed from Draft to New...

     

    Thank you very much in advance.

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Eeyore2005 

     

    Set the default property of the text control "Saved as New"

     

    Coalesce(Parent.Default,timestamp)

     

    and also Set the default property of the text control "Person Saved as New"

     

    Coalesce(Parent.Default,PersonCreated)

     


    Thanks, Stalin (Microsoft MVP)
    Blog - Learn To Illuminate Blog
    YouTube - Learn To Illuminate Videos

  • Eeyore2005 Profile Picture
    119 on at

    @StalinPonnusamy 

    Thank you very much, I was able to resolve my problem quite easily by changing the Text control "Person Saved as New" default property to:

    If(IsBlank(Gallery_Requests.Selected.'Saved as New') && 'Toggle_Change to New'.Value, Now(),Parent.Default)

     

    I was simply so stuck in it and thus unable to see the wood for the trees... 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard