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 Platform Community / Forums / Power Apps / How to build the share...
Power Apps
Suggested Answer

How to build the sharepoint list to save data from an auditing app

(1) ShareShare
ReportReport
Posted on by 8
Hi,
 
I am relatively new to PowerApps so apologies if this is a simple or stupid question.
 
I am trying to create an app where our staff can produce cleaning standard documents for the machines in our factory. These will then form a list of required cleaning on that particular machine. This bit I have managed okay.
 
I then would like to be able to audit the cleaning on the machine, based on the cleaning documents created. My problem is I'm not sure how to set up the sharepoint list or how to save the data into it. I am familiar with the Patch function and can use it to a decent level but not sure if this is even the right function.
 
So basically 
1. Cleaning document is created
2. Cleaning documents are compiled by machine into a list for every document relevant to each machine
3. A yes/no/not applicable check box is checked for every cleaning document on a specific machine to say if that area of the machine is clean.
4. A cleaning score is created based on the amount of yeses or Nos that are selected.
 
I hope I have explained this well enough and thank you in advance for your help!
 
I have attached the zip of the app so far and a rough sketch of how I think the auditing page should look.
Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    6,334 Super User 2026 Season 1 on at
     
    Hope this will give you idea.
     
    1. CleaningDocuments (Stores the cleaning requirements for each machine)
    • ID (Auto-generated)
    • MachineName (Lookup to Machines list or text or choice )
    • CleaningNo (Unique identifier for cleaning step)
    • Description (What needs to be cleaned
    2. CleaningAudits (Stores audit results for each cleaning step)
    • ID (Auto-generated)
    • MachineName (Lookup to CleaningDocuments list MachineName column )
    • CleaningDocumentID (Lookup to CleaningDocuments list ID column )
    • AuditedBy (Person or text)
    • DateAudited (Date)
    • IsClean (Choice: Yes, No, Not Applicable)
     
    App
    • Machine selection: Dropdown to select a machine.
    • Gallery: Display all CleaningDocuments related to the selected machine.
    • Checkboxes (Yes/No/NA): Used to store cleaning status.
    • Submit button: Saves responses to the CleaningAudits list.
     
    Hope this will helps
  • Suggested answer
    Ravi-Prajapati Profile Picture
    416 Moderator on at

    Here's a structured way to set up your SharePoint lists and how you can use the Patch function to save the data.

    1. SharePoint List Structure

    You'll likely need at least two SharePoint lists:

    1. CleaningDocuments

      • ID (Auto-generated)
      • Title (Cleaning task name)
      • MachineID (Lookup to Machines list)
      • Description (Optional, for cleaning instructions)
    2. CleaningAudits

      • ID (Auto-generated)
      • MachineID (Lookup to Machines list)
      • CleaningDocID (Lookup to CleaningDocuments list)
      • AuditDate (Date/Time)
      • CheckedBy (Person column)
      • Status (Choice: "Yes", "No", "Not Applicable")

    2. Power Apps Implementation

    • Display a gallery of cleaning documents relevant to a selected machine.
    • For each cleaning document, allow users to select "Yes," "No," or "Not Applicable."
    • Save audit results to CleaningAudits using the Patch function.

    3. Saving Data Using Patch

    You can loop through the selected values and store them in the CleaningAudits list:

    ForAll(
    Gallery_CleaningDocuments.AllItems,
    Patch(
    CleaningAudits,
    Defaults(CleaningAudits),
    {
    MachineID: Dropdown_Machines.Selected.ID,
    CleaningDocID: ThisItem.ID,
    AuditDate: Today(),
    CheckedBy: User().FullName,
    Status: Dropdown_Status.Selected.Value
    }
    )
    )

    4. Calculating the Cleaning Score

    To determine a score, count the "Yes" and "No" responses:

     
    With(
    {auditData: Filter(CleaningAudits, MachineID = Dropdown_Machines.Selected.ID, AuditDate = Today())},
    Round(
    CountIf(auditData, Status = "Yes") / CountRows(auditData) * 100,
    2
    )
    )

    This gives you a percentage score based on the number of "Yes" responses.

  • SteHuhta24 Profile Picture
    8 on at
    Thank you for your answers - I will give these a try! Much appreciated.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard