cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brockjvl
Level: Power Up

When a toggle is moved display timestamp

Hello all! 

 Can someone tell me how to display and or update a timestamp if a toggle is moved on and off? 

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: When a toggle is moved display timestamp

Oops my bad, I left it off.
UpdateContext({timestamp:Now(), showing:!showing})

View solution in original post

7 REPLIES 7
Super User
Super User

Re: When a toggle is moved display timestamp

Hi @brockjvl,

You do it with the UpdateContext() function.  On your Toggle OnChange property- UpdateContext({timestamp:Now(), showing:!showing). Put a TextInput box on the screen and set its Default property to timestamp, set its DisplayMode- View and set its Visible property- showing.  Now when you change the toggle, the TextInput box will display the timestamp in read only mode and when you toggle again, it will hide the textbox.  

brockjvl
Level: Power Up

Re: When a toggle is moved display timestamp

@Drrickryp ,

 Thank you for the reply. I will apologize up fron, but I am a complete noob with PowerApps. So I followed your steps, to the best of my knowledge, and I still seem to be having issues. Am I missing something, is my formatting wrong? Please take a look at my screenshots and see if I followed your directions properly.

 

 Again, thank you for your help. 

brockjvl
Level: Power Up

Re: When a toggle is moved display timestamp

 
Super User
Super User

Re: When a toggle is moved display timestamp

You left off the second curly brace in the OnSelect property of the toggle. If this answers your question place Mark it solved.
Super User
Super User

Re: When a toggle is moved display timestamp

Oops my bad, I left it off.
UpdateContext({timestamp:Now(), showing:!showing})

View solution in original post

brockjvl
Level: Power Up

Re: When a toggle is moved display timestamp

That worked! 

Thank you @Drrickryp for your assistance!

 

Super User
Super User

Re: When a toggle is moved display timestamp

Please mark the issue solved off you are happy with the answer.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 327 members 6,173 guests
Please welcome our newest community members: