cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brockjvl
New Member

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

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

View solution in original post

7 REPLIES 7
Drrickryp
Super User II
Super User II

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.  

@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. 

 

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

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

View solution in original post

That worked! 

Thank you @Drrickryp for your assistance!

 

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (46,357)