SKIP AHEAD TO
What does a FILTER block do?
What are the common use cases for the FILTER block?
What field codes can I enter into a Filter LIST field?
How to configure a FILTER block
(Intermediate) Use Case: Audit Reporting and Scoring
What does a FILTER block do?
FILTER blocks are used to separate List items that meet a pre-determined condition. These List items become the output of the FILTER block in a new List.
Being a function block similar to COMP Table and MERGE blocks, a Filter does not display a page to your user. Instead, it processes the end user inputs in the background.
What are the common use cases for the FILTER block?
The common use cases for FILTER blocks involve scoring and reporting based on end user responses. FILTER blocks are typically used in conjunction with MERGE and COMP Table blocks and the filtered Lists created in FILTER blocks can be referenced to be displayed within an App or inside a document.
A common example of this is an audit process where end-users are asked to answer multiple Yes or No questions. Typically, the audit score is calculated based on the percentage of questions they respond “No” to. Therefore, the entire set of responses provided by end user can first be collected then merged into a List using the MERGE block that is then filtered using the FILTER block to identify the questions they answered “No” to. This filtered List can then be referenced to be displayed to the auditor within the App or inside a document and/or inserted into a COMP Table block to calculate the audit score.
See how to implement the above use case at the bottom of this article.
What field codes can I enter into a Filter LIST field?
Any variables that represent a List. These can include:
Variables |
Example |
LIST# | LIST5 |
LP#_SET# (from LOOPs) | LP3_SET5 |
COMP#_cell# (If the cell holds a List variable) | COMP16_A1 |
TABL#_cell# (If the cell holds a List variable) | TABL5_B2 |
How to configure a FILTER block
To create a filtered List with a filter:
- Drag in a FILTER block and click on it to open the Property Editor
- Identify the variable name of the List you want to filter.
For example, a List that captures the type of fruits from the end user. - In the FILTER block's Property Editor, click "+ Add filter list" and enter the List variable name in the "Filter LIST" field
Note: There is no limit to the number of filter Lists one FILTER block can hold. All Lists in a single FILTER block are filtered under the same filter condition. - In the "Filter Condition" field, enter a condition to filter the output values in the List using the "!=" operators.
For example, the condition in the screenshot below (i.e. LIST5 != "Apple") will remove any list items that are “Apple”.
What will my user see?
Using the previous example, if the condition is set as LIST5 != "Apple", any user input with the String "Apple" will be removed in the filtered List.
For example, LIST5 which captures end-user input, can be filtered to create a new list with only the items that satisfy the set condition (I.e., to not include the list item “Apple”)
When the new filtered List variable is referenced, it will display the following based on the no Apple condition.
(Intermediate) Use Case: Audit Reporting and Scoring
The following step-by-step walk through will cover a small example App for audit reporting and scoring for claims to understand how FILTER blocks can be used. It will be assumed that you have a clear understanding on how MERGE, COMP Table and TABLE blocks work.
The App design for this example App is as shown in the screenshot below:
- Inside the initial FORM block, the end user responses (I.e. answers) are captured via radio buttons with options for “Yes” and “No”
- To use the FILTER block, we must insert List variables. Therefore, we can use the MERGE block to create 2 Lists that collate all questions (i.e. LIST35) and answers (i.e. LIST44) from the initial FORM block respectively.
Note: Please note that the order of the questions and the user input fields are corresponding to each other as this will be displayed at the end.
- Once each List for the questions and answers have been created using the MERGE block, we can now insert these into the FILTER block to create filtered Lists.
- Now the filtered List can be inserted inside the first COMP Table block (I.e., COMP27), to calculate the audit score. This can be done by quantifying the size of each List by using the “LIST#_SIZE” syntax.
- In the second COMP Table block (I.e., COMP28), we can use the calculated audit score and assign it a percentage range score to be displayed to the auditor in the TABLE block as shown in the next step.
- In the last TABLE block in the App, we can reference all the questions and answers from the user from the Lists created in the initial MERGE block and display the score calculated in the background using the FILTER and COMP Table blocks.
What the users will see: