Hello,
I am very new to PowerApps and still learning - Please bear with me.
I have built an app, for a reporting system, it logs the date and name to separate fields in lists when it gets editted.
I want this to populate a seperate field which will act as a historic audit log.
Is this possible? Can anyone guide me how to do this?
Thanks
Solved! Go to Solution.
There are several ways to do this but one way is to create a separate audit log list and when the user saves the form, in the OnSuccess property of the form: Patch(auditlist, Defaults(auditlist),{ID:Self.LastSubmit.ID, Field1:Self.LastSubmit.Field1, Field2:Self.LastSubmit.Field2, Datefield:Now(), Userfield:User().FullName ...}). Be aware that these audit lists can grow to be very large.
There are several ways to do this but one way is to create a separate audit log list and when the user saves the form, in the OnSuccess property of the form: Patch(auditlist, Defaults(auditlist),{ID:Self.LastSubmit.ID, Field1:Self.LastSubmit.Field1, Field2:Self.LastSubmit.Field2, Datefield:Now(), Userfield:User().FullName ...}). Be aware that these audit lists can grow to be very large.
Hi, Thanks for the reply. looking at this it has thrown up some errors when trying to locate the source.
My list is called BNSOR
below you can see I wish for the data to be entered into the field Audit Log of that record.
Here is the code editted to match my fields.
Have I made a fatal error?
Patch(BNSOR, Defaults(BNSOR),{ID:Self.LastSubmit.ID, Modified:Self.LastSubmit.Modified, Modified By:Self.LastSubmit.Modified By, Modified:Now(), ModifiedBy:User().FullName ...}))
Hi @ChristopherWood ,
You can not update these fields.(ID,Modified,ModifiedBy... ) because they are created by system and read only.
Please try to follow @Drrickryp 's solution to create a new list and some custom fields to store your logs.
Best Regards,
Wearsky
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
52 | |
41 | |
38 | |
28 |
User | Count |
---|---|
255 | |
81 | |
71 | |
68 | |
66 |