web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Audit Records

(0) ShareShare
ReportReport
Posted on by 66

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 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ChristopherWood 

    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. 

     

  • ChristopherWood Profile Picture
    66 on at

    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.

     

    ChristopherWood_0-1652427566040.png

     

  • ChristopherWood Profile Picture
    66 on at

    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 ...}))

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard