How to Create a Checklist in PowerApps

PowerApps is the perfect tool for switching paper checklists and converting them into digital data. There are many advantages to doing this such as saving time, paper and the ability to create a Power BI dashboard to measure the results. In this tutorial I will show you step by step how to create a checklist in PowerApps. Continue reading and you too will be an office power user!

How-to-create-a-checklist-in-PowerApps

First thing we will need is some data for you to work with. I am using data stored in a SQL table but if you need some data to work with in this tutorial then you can create the collection below and place it in an onVisible of a blank screen. Let’s create it now followed by the collection for the checklist.

Setting up Your Data and the Checklist Collection

  • Screen:
    • OnVisible:
      ClearCollect(
      colWPOItems,
      {
      WPO: “Cell-Phone/ Radio”,
      WPODesc: “No cellphone used while working and/or walking.”,
      ID: 1
      },
      {
      WPO: “Access”,
      WPODesc: “Use safe routes to accessing work areas.”,
      ID: 3
      }, {
      WPO: “Height”,
      WPODesc: “Best safety practices and utilizing only approved devices.
      ,
      ID: 3
      }
      ) ;

      ClearCollect(
      colCheckList,
      AddColumns(
      colWPOItems ,
      “CheckStat”,
      “”
      )
      )

Setting up the Checklist Gallery

I am not going to create the menu as in the animation above in this post on how to create a checklist in PowerApps, I will stick to the logic in collecting the checklist values. You can learn more here about how to create a dynamic progress bar in PowerApps as shown above.

  • Gallery: Insert a blank vertical gallery.
    • Name: GalleryItemCheck
    • X: 0
    • Y: 331
    • Width: 640
    • Height: 558
    • Items: colCheckList // in actual app I have a filter based on the menu.
    • Fill: RGBA(195, 201, 203, 1)
    • TemplateFill: RGBA(255, 255, 255, 1)
    • TemplateSize: 87
  • Label: Insert inside of the galley template.
    • Text: ThisItem.WPO
    • X: 9
    • Y: 0
    • Width: 170
    • Height: 86
  • Label:
    • Text: ThisItem.WPOdescription
    • X: 191
    • Y: 0
    • Width: 252
    • Height: 86
  • Icon:
    • Icon: Icon.EmojiSmile
    • X: 498
    • Y: 21
    • Width: 44
    • Height: 44
    • Color:
      If(
      ThisItem.CheckStat = “P”,
      RGBA(
      54,
      176,
      75,
      1
      ),
      RGBA(
      105,
      121,
      126,
      1
      )
      )
    • OnSelect:
      If(
      ThisItem.CheckStat = “” || ThisItem.CheckStat = “F”,
      UpdateIf(
      colCheckList,
      ID = ThisItem.ID,
      {CheckStat: “P”}
      ),
      UpdateIf(
      colCheckList,
      ID = ThisItem.ID,
      {CheckStat: “”}
      )
      )
  • Icon:
    • Icon: Icon.EmojiSad
    • X: 573
    • Y: 21
    • Width: 44
    • Height: 44
    • Color:
      If(
      ThisItem.CheckStat = “F”,
      RGBA(
      255,
      0,
      0,
      1
      ),
      RGBA(
      105,
      121,
      126,
      1
      )
      )
    • OnSelect:
      If(
      ThisItem.CheckStat = “” || ThisItem.CheckStat = “P”,
      UpdateIf(
      colCheckList,
      ID = ThisItem.ID,
      {CheckStat: “F”}
      ),
      UpdateIf(
      colCheckList,
      ID = ThisItem.ID,
      {CheckStat: “”}
      )
      )

Saving the Completed Checklist

To wrap this up we will insert a text input for the note, a label to check if all checks have been completed and if they have been completed we will show a button to put the logic for us to submit this completed checklist and save the results back to a database. Here you will notice not only are we capturing the results but we are also saving additional data such as who completed, team and more. Also we are checking if the user is online and if not it’s saving the data offline to upload later. I have logic in my app else were to deal with this. I will explain working offline in a future post.

  • Text input:
    • Name: txtNote
    • X: 18
    • Y: 903
    • Width: 607
    • Height: 903
    • Mode: TextMode.MultiLine
    • HintText: “Note”
  • Label: This is used to test if all items have been completed.
    • Name: lblCheckIfAllAnswered
    • Visible: false
    • Text:
      CountRows(colCheckList) – (CountRows(
      Filter(
      colCheckList,
      CheckStat = “P”
      )
      )+CountRows(
      Filter(
      colCheckList,
      CheckStat = “F”
      )
      ))
  • Button:
    • Name: ButtonSubmit
    • X: 13
    • Y: 1056
    • Width: 612
    • Height: 70
    • Visible: lblCheckIfAllAnswered.Text=”0″ // to ensure all checks have been done.
    • OnSelect:
      UpdateContext({varShowSpinner: true}); // see link below on how to create a spinner component in PowerApps
      UpdateContext({varHeaderID: Text(GUID())});
      Collect(
      coltblWPO_Header,
      {
      CheckDT: Today(),
      Note: txtNote.Text,
      CompletedBY: varUser,
      OUid: varOU,
      LocationID: varLocation,
      TeamID: varTeam,
      HeaderTempID: varHeaderID
      }
      );
      Reset(txtNote);
      Clear(colDetails);
      ForAll(
      colCheckList,
      Collect(
      colDetails,
      {
      HeaderID: 0,
      ItemID: ID,
      Status: CheckStat,
      CheckDT: Today()
      }
      )
      );
      Collect(
      coltblWPO_Details,
      AddColumns(
      colDetails,
      “TempHeaderID”,
      varHeaderID
      )
      );
      If(
      Connection.Connected,
      ForAll(
      coltblWPO_Header,
      With(
      Patch(
      ‘[dbo].[tblWPO_Header]’,
      Defaults(‘[dbo].[tblWPO_Header]’),
      {
      CheckDT: CheckDT,
      CompletedBY: CompletedBY,
      HeaderID: HeaderTempID,
      LocationID: LocationID,
      Note: Note,
      OUid: OUid,
      TeamID: TeamID
      }
      ),
      ForAll(
      Filter(
      coltblWPO_Details,
      Text(TempHeaderID) = Text(HeaderTempID)
      ),
      Patch(
      ‘[dbo].[tblWPO_Details]’,
      Defaults(‘[dbo].[tblWPO_Details]’),
      {
      HeaderID: ID,
      CheckDT: CheckDT,
      ItemID: ItemID,
      Status: Status
      }
      )
      )
      )
      );
      Clear(coltblWPO_Header);
      Clear(coltblWPO_Details);
      SaveData(
      coltblWPO_Header,
      “LocalcoltblWPO_Header”
      );
      SaveData(
      coltblWPO_Details,
      “LocalcoltblWPO_Details”
      ),
      SaveData(
      coltblWPO_Header,
      “LocalcoltblWPO_Header”
      );
      SaveData(
      coltblWPO_Details,
      “LocalcoltblWPO_Details”
      )
      );
      UpdateContext({varShowSpinner: false});
      Navigate(ScreenSuccessfull)

Now you know how to create a checklist in PowerApps! Please leave your feedback. I hope this article has been helpful for you so bookmark this blog as new articles are be posted regularly. 

Additional Resources

how-to-create-a-dynamic-progress-bar-in-powerapps
how-to-create-a-spinner-component-in-powerapps

Share the knowledge!

Paul Rodrigues

Business Analyst with 20 years of IT experience creating practical solutions. I love to automate business processes through the use of technology while making the end users work easier. My current favorite tools are PowerApps, Power BI and Power Automate. #PowerAddict

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *