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.
@ShanesCows3 жыл бұрын
Great suggestion!
@wesleyvanderblom6 жыл бұрын
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.
@ShanesCows6 жыл бұрын
Thanks
@Thor_Underdunk_Caballerial3 жыл бұрын
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."
@adalbertoabade3 жыл бұрын
always saving me with your videos. Thanks!
@ShanesCows3 жыл бұрын
Happy to help 🐶
@sidneyerickson59516 жыл бұрын
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!
@ShanesCows6 жыл бұрын
Yup. Good point I sometimes think too much on best way to teach it vs best way to implement it. 😻
@sidneyerickson59516 жыл бұрын
Well, keep it up, cause you have the best way to teach down. I have learned more from your videos than any other source!
@benhouser4527 күн бұрын
Hi Shane! This is great, I do have a question built off this tutorial..... Let's say I have a login screen made that references a list for users with names and passwords to get me into the app. How do I log who is "logged in" versus using the microsoft login user?
@martinwhite23692 жыл бұрын
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)
@ShanesCows2 жыл бұрын
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.
@JonathanExcels6 жыл бұрын
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?
@ShanesCows6 жыл бұрын
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.
@ShanesCows6 жыл бұрын
In my head something similar to this is your answer. zpr.io/nFiYF
@davidflockton42965 жыл бұрын
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
@ShanesCows5 жыл бұрын
ThisItem.PreferredName
@MrGregMelson6 жыл бұрын
Thank you for sharing Shane :)
@ShanesCows6 жыл бұрын
You are welcome. 😀
@gauravghai063 жыл бұрын
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?
@ShanesCows3 жыл бұрын
You can use the User() function to get info about the logged in user. kzbin.info/www/bejne/fKG7o3lrg6mNmKs
@gauravghai063 жыл бұрын
@@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.
@meniteshgoyal2 жыл бұрын
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?
@kairbekshagiyev66283 жыл бұрын
Thanks for video Shane! How can we use SharePoint List's Version History in PowerApps? Please share with us if you know)
@ShanesCows3 жыл бұрын
You would have to use the rest api to call it. I have not done it before. This video introduces the concept kzbin.info/www/bejne/o4eypXmNeJuEbqc
@zildjiandames77416 жыл бұрын
Hi Shane! Great video as usual, good to know that we can audit, can we also record what was changed?
@ShanesCows6 жыл бұрын
You would have to add the logic yourself.
@rengon96114 жыл бұрын
@@ShanesCows how would you add this logic? Any examples? I’m new to power apps. Thank you!
@webdevguy_6 жыл бұрын
Brilliant! Thanks!
@ShanesCows6 жыл бұрын
Glad you liked it. It seems so simple after the fact had a hard time describing it.
@webdevguy_6 жыл бұрын
It was perfect! Keep up the good work!
@brightonalbert32374 жыл бұрын
thanks can i have multiple tracking of data changes i.e. if a data set was edited by who and at what time
@ShanesCows4 жыл бұрын
Yes. Just patch whatever you want to save.
@brightonalbert32374 жыл бұрын
@@ShanesCows thanks
@MrAmitav20003 жыл бұрын
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.
@kyrstincote637 Жыл бұрын
Do you have suggestions for when a Network error occurs on this function? :(
@ShanesCows Жыл бұрын
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.
@GinaTheBeans6 ай бұрын
My form already has 'code' in 'OnSuccess' so trying to add Patch function is always giving me errors telling me expects a "&, +, etc." to be present .... not sure what I am doing wrong but I don't want to change what exists there already on submit.
@ShanesCows6 ай бұрын
Are you putting a ; between your formulas? Set(var1, “buddy”);set(var2, dog);patch(…
@emanuelpinto73946 жыл бұрын
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??
@ShanesCows6 жыл бұрын
Yes, I use hidden cards all of the time. :)
@bopraYT6 жыл бұрын
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?
@ShanesCows6 жыл бұрын
Try this video from my buddy Vivek m.kzbin.info/www/bejne/hX6Qo5-egK95iqM
@bopraYT6 жыл бұрын
Thanks!
@tharindlaksh6 жыл бұрын
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.
@ShanesCows6 жыл бұрын
You can use Today() function to write the current date.
@tharindlaksh6 жыл бұрын
@@ShanesCows Hi Shane. Thanks for the reply.. it seems like i have got syntax incorrect earlier.. Today() work as charm.. :)
@jdguyz Жыл бұрын
how do i create event log in sharepoint to update status as start, pause or finish when a button is clicked
@ShanesCows Жыл бұрын
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"})
@anantnd3934 жыл бұрын
Can I do the same with the excel file stored on blob?
@ShanesCows4 жыл бұрын
Excel can only be a data source if it is in OneDrive for Business.
@gandlaveeresh72322 жыл бұрын
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?
@fredbarnes196 Жыл бұрын
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
@eulama14 жыл бұрын
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!
@ShanesCows4 жыл бұрын
When you see me use a ; you should use a ;; 😀
@eulama14 жыл бұрын
@@ShanesCows thanks
@santiago465 жыл бұрын
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!
@ShanesCows5 жыл бұрын
Hey James. Everyone has to authenticate ton Open the app so I don’t think you need a login screen?
@messilois59414 жыл бұрын
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.
@ShanesCows4 жыл бұрын
You could make people "login" inside your app. I think that would be against the licenscing though so be careful.
@deepanrajs22095 жыл бұрын
Hai Shane, How do I find logged in users ???
@ShanesCows5 жыл бұрын
This video with ther User() function. kzbin.info/www/bejne/fKG7o3lrg6mNmKs
@rolando27425 жыл бұрын
Hello, Somebody knows how to get the users ip address in Powerapps. Thanks.