How to Count Rows in a Table or Loop Screen in the Builder

Have more questions? Submit a request

Counting the rows in a Table or Loop Screen is a popular workaround that only takes a few steps to set up.

Count Rows in a Table

This can be applied to many different scenarios but some examples include:

  • Counting passed and/or failed inspection items,
  • Counting correct answers in a quiz (alternatively, this can also be done with Reference Data),
  • Assessing risk in the field by assigning hazard ratings that can be summarized for quick reference.

Our customers have found many ways to benefit from this trick and perhaps your team could benefit from this automation. Below is step-by-step instructions for counting every row of a table or loop screen. This solution requires one Number field and one Calculation field.

  1. Locate an existing Table or Loop Screen or create a new one.
  2. Add a Number field to the Table or Loop Screen and on a proceeding Screen, add a Calculation field, using your preferred method.

    Note

    The calculation field must be placed on a separate screen located after the table or loop screen in order to properly count every row.

  3. Label both the number field and calculation field something descriptive (i.e. "First Floor Count" and "First Floor Summary" in our example).
  4. Select the number field to open the Field Settings in the left panel and add a Default Value of 1.
  5. Expand the Advanced menu and click the blue toggle beside Mobile Visible to hide the field on mobile.
    Builder_Count Rows_Number Field Settings.png
  6. Select the calculation field to open the Field Settings in the left panel.
  7. Click Sum next to Calculation Type.
  8. Sum Field will appear below Calculation Type in the Field Settings. Expand the drop down and scroll to find the table or loop screen where the count field is located (i.e. "First Floor" in our example).
  9. Select the number field we configured above (i.e. "First Floor Count" in our example).
    Builder_Count Rows_Calculation Field Settings.png

Now you have a field that will summarize every row in a table or loop screen. Save and Test in your browser or Publish to test on mobile.

GoCanvas Tip

GoCanvas experts presented a Webinar where we cover Counts & Summaries with a condition for an extra level of specificity in your count. The solution presented in this webinar uses conditions to count rows contingent upon a value captured in the row, specifically when an inspection item is marked as fail. Please be advised that this webinar was recorded using the Legacy Builder but the mechanics are very similar when using the Builder.

Did we answer your question?

We'd really appreciate your feedback! Please leave your suggestions for improvement in the comments or let us know what you're looking for so we can assist you better. We want to help, but we need to understand your needs!

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.