Calculating the Number of Values Selected in a List

Scenario

You've built a form, and you'd like to count some of the users entries in a List Data macro. Check this out on our Demo site.



Recipe

Ingredients

Apps

Reporting, Scaffolding
Platform
Server
Level

INTERMEDIATE

Estimated time

10 minutes

Macros

Suppliers

Storage format

Steps

  1. Create a Table Data macro and set the Name to "failpass".

  2. Within the Table Data macro, create a table and insert a List Data macro.
    Set the Name to "result".

  3. Inside the List Data macro insert two List Option macros.
    Set the values of List Option macros to "fail" and "pass".

  4. Create a Report Variable macro.
    Set the name to "totalFail".

  5. Within the Report Variable macro create a Local Reporter macro.
    Set the Key to "data:failpass".

  6. Inside the Local Reporter macro, create a Text Filter macro.
    Set the Key to "data:result" and Exact Value to "fail".

  7. Create another Report Variable macro.
    Set the Name to "totalPass".

  8. Within the Report Variable macro create a Local Reporter macro.
    Set the Key to "data:failpass".

  9. Inside the Local Reporter macro, create a Text Filter macro.
    Set the Key to "data:result" and Exact Value to "pass".

  10. Create a Report Info macro.
    Set Key to "variable:totalFail>size".

  11. Create a Report Info macro.
    Set Key to "variable:totalPass>size".

  12. Finally, create a Report Eval macro, and enter the following inside:
    %variable:totalPass>size% + %variable:totalFail>size%