PowerApps Audit Logging
HTML-код
- Опубликовано: 2 май 2018
- In this video, you will learn how to track when users modify your data with PowerApps. We do this using the User() and Now() function combined with OnSuccess. Not terribly complicated but an effective solution for tracking that info you need.
Video on the User() function
• PowerApps User Functio...
Video on Patch
• PowerApps Patch Function
If you need further assistance feel free to contact www.PowerApps911.com Наука
always saving me with your videos. Thanks!
Happy to help 🐶
Great video Shane !! Without a doubt your classes are the best ...
I thought of another way too, we could have put Now and the User function inside the card and made it invisible, this way whenever they edit the form itself it would collect the data.
Great suggestion!
Thank you for sharing Shane :)
You are welcome. 😀
Hi Shane, thanks, great video. When working with CDS, you can put the "user().FullName" as a default value in the field (a field like "EditedBy" of the entity). Set the field to visible 'false' and it works great, and automatically (and the user can't put false input into the field). A entity in CDS has by default already fields as LastModifiedBy (system user code) and LastModifiedDateTime. The last one (DateTime) you can use as the (in the video) mentioned 'when' field to audit.
Thanks
Great tip. With my limited knowledge I tried to replicate this with SharePoint as a backend, but PowerApps didn't like "user().FullName" as the default value of the datacard and threw up "invocation of unknown or unsupported function."
Hi Shane, It would be helpful if you could post some videos on enable/disable "Audit changes to its data" feature under settings in a custom entity. Where are these logging data saved? Can I access these logs in my canvas App? I understand Auditing feature has to be enabled from Admin center for an environment.
Hi Shane,
Thanks for such an informative video. Could you please provide me with steps for the following case --> Get data from Table A and write final form data in Table B?
I was really excited when I saw the title of this video because it sounded like exactly what I am trying to do and your videos are easy to understand. I guess my need is slightly different. I have a SP list and I have versioning turned on so I can track each item as it changes. When I look at the history of an item is has all the detail I need. I just can’t figure out how to get that history to show in my form. Example, when I open a list item I would like to view who upload the attachment and then who subsequently approved it right on the power apps form. Is there a way to do this?
Not that I know of. PowerApps doesn’t know about those properties. I am thinking custom connector. The client side object model knows what you want. Maybe Flow can help? Just not sure.
In my head something similar to this is your answer. zpr.io/nFiYF
Thanks for your videos Shane. Is there anyway to bring Dataverse Audit data into the app? (Assuming of course that auditing is enabled in that organisation/app/environment)
I don't know Martin, I have never tried. 🤔 My best guess would be to look for the table and query it directly but i am just guessing.
Hi Shane, your videos are great and have helped me so much as a total newbie to create my own app!! I have followed this video and have it all working great, but wondered how I would go about changing user().fullname to show the data from a field in my SharePoint list called PreferredName instead? I have used this field in the browse screen (gallery) to show the users name. Thanks
ThisItem.PreferredName
Brilliant! Thanks!
Glad you liked it. It seems so simple after the fact had a hard time describing it.
It was perfect! Keep up the good work!
Hy Shane! It always takes me forever to Patch something on my apps. I was wondering if I could do this: get the correct code into de "Update" of mais EditBy and EditWhen DataCards, on the Form, and then make those DataCards not visible. Do you think that's gonna be a solution as good? And if I wanted a change history, so, not only the last editor, but who edited and when, from the record creation. What would you suggest??
Yes, I use hidden cards all of the time. :)
i am not getting the user and time details into the share point list as well as into powerapps gallery can you please help me with this?
You can also have PowerApps fill in the hidden fields while the user is creating or editing the form, then use the SubmitForm command to save the UserName and Time stamp. In this way, you don't have to use Patch. I am not sure if there is any benefit either way, probably just a preference? Great Video by the way!
Yup. Good point I sometimes think too much on best way to teach it vs best way to implement it. 😻
Well, keep it up, cause you have the best way to teach down. I have learned more from your videos than any other source!
Thanks Shane for producing such a helpful tutorial. I have implemented the same to record Username (under modified by), time (modified at) and now trying my hands on created by and created on. My database is in SQL which is integrated with Powerapps. I managed to create created on field in SQL itself when a new record is created but now I am struggling to pass on username for created by using power apps as it has to be fixed. Would you be able to share some light on this?
You can use the User() function to get info about the logged in user. ruclips.net/video/FpXrF5NDZbI/видео.html
@@ShanesCows thanks! I am using the same to capture modified by. I am struggling to build the logic around Created by as everytime a new user logs in, it should only patch/update the modified by field but not the created by.
Hi Shane! Great video as usual, good to know that we can audit, can we also record what was changed?
You would have to add the logic yourself.
@@ShanesCows how would you add this logic? Any examples? I’m new to power apps. Thank you!
Great! +1 subscriber :) . Could you do a video covering how do to add User Action(eg. edit, new, delete), OldValue and NewValue in a separate table?
Try this video from my buddy Vivek m.ruclips.net/video/OM-rlhKJFTA/видео.html
Thanks!
Thanks for video Shane! How can we use SharePoint List's Version History in PowerApps? Please share with us if you know)
You would have to use the rest api to call it. I have not done it before. This video introduces the concept ruclips.net/video/mVOtFWC6Q8E/видео.html
This is nice and clean but in many cases you will have a blue house and then later you paint it red, then green then yellow. You want everyone to get credit for their work, not the last person to get all the credit. How do you log all of your "key updates" and make them available to your form
Hello Shane, Do you have a video on how to use 0ffice365user function for user authentication? I need to create a login screen with the sign in button. what do I implement in the sign-in button to make the authentication happen... Thanks for your response!
Hey James. Everyone has to authenticate ton
Open the app so I don’t think you need a login screen?
Do you have suggestions for when a Network error occurs on this function? :(
Depends on when you are getting it. Most common reason I see it is a bad patch statement because you are not sending the data that it wants so it gets confused.
Hi Shane, I have a problem that i want to save current time to one of the SharePoint field when im saving some other data. Im using patch function for this and im getting error on the equation of update portion. Is there any way to save current date in to SharePoint field using patch.
You can use Today() function to write the current date.
@@ShanesCows Hi Shane. Thanks for the reply.. it seems like i have got syntax incorrect earlier.. Today() work as charm.. :)
how do i create event log in sharepoint to update status as start, pause or finish when a button is clicked
Create a SharePoint list with the columns you want to track. Have the button do whatever the button normal does and then Patch(YourList,Defaults(YourList), {YourColumns: "Your Message"})
thanks can i have multiple tracking of data changes i.e. if a data set was edited by who and at what time
Yes. Just patch whatever you want to save.
@@ShanesCows thanks
Good Morning!
I'm still in progress, I like it a lot, but in Spain it doesn't work to concatenate the functions where you use a comma. I try to put something but it doesn't work for me.
Patch (Products; EditForm1.LastSubmit; {EditeBy: User (). FullName; EditeWhen: Now ()})
I can't add the back () function
What I can do?
thank you!
When you see me use a ; you should use a ;; 😀
@@ShanesCows thanks
Hi, we are using one account, but i want to know who edit the record. Can i add a login screen with user name and password, then if the person who login edited the record, the re ord will show who edit it. If yes, how to add the edit by in the edit form which are usingnthe login user name.
You could make people "login" inside your app. I think that would be against the licenscing though so be careful.
Can I do the same with the excel file stored on blob?
Excel can only be a data source if it is in OneDrive for Business.
Hello,
Somebody knows how to get the users ip address in Powerapps.
Thanks.
Not possible today. Sorry
Hai Shane,
How do I find logged in users ???
This video with ther User() function. ruclips.net/video/FpXrF5NDZbI/видео.html