cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shivaji
Frequent Visitor

Timestamp and User Id record upon submit ?

Hi, 

 

I am new to PowerApps. I have created a powerapp's by connecting to sql server.

My query is, I need to record the timestamp and userid when they update the data through the apps.

When they select the submit form, it should record the timestamp and user id and save it database. 

2.jpg

 

 

I have herewith attached a screenshot containing the columns name in the database. 

 

User_d.jpg 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

Since you are already using a form, I suggest you add 2 Datacards for the Time stamp and the user ID.

In the Default of the Datacardvalue of the UserId : User().Email

 

In the Default of the Datacardvalue of the Time stamp put the variable name: TimeNow

 

Finally on the submit Icon, create a variable before submit form as;

Set(TimeNow,Text(Now(),"hh:mm:ss"));SubmitForm(YourFormName)

 

 

Thus before the Form is submitted, it create the current time to be submitted.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

View solution in original post

1 REPLY 1
eka24
Super User
Super User

Since you are already using a form, I suggest you add 2 Datacards for the Time stamp and the user ID.

In the Default of the Datacardvalue of the UserId : User().Email

 

In the Default of the Datacardvalue of the Time stamp put the variable name: TimeNow

 

Finally on the submit Icon, create a variable before submit form as;

Set(TimeNow,Text(Now(),"hh:mm:ss"));SubmitForm(YourFormName)

 

 

Thus before the Form is submitted, it create the current time to be submitted.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,122)