Merge

SKIP AHEAD TO
Design a Merge
Reference Merge Lists
What will my user see?
When would I use Merge?

Merge.jpeg

Merge blocks collate inputs that your user has provided throughout your App into a List.

Being a Function, a Merge does not display a page to your user. It instead processes your user's inputs in the background.

 

Design a Merge


 

To create a collated List with a Merge:

  1. Identify the variable names for the inputs you want to reference.

    Name_studio.jpeg         Age.jpeg

  2. In the Property Editor for the Merge, click Add output sets.
  3. Click Add variable until there is one Variable REF field for each input.
  4. Enter one field code into each Variable REF field.

    Property_Editor.jpeg

 

Merge inputs conditionally

For each Variable REF, you can attach a condition. If the condition is not met, the input in that Variable REF field will be excluded from the collated List.

With_condition.jpeg

 

Produce multiple collated Lists

Click Add output sets. Each output set represents one collated List. There is no limit to how many output sets one Merge can hold.

 

Reference Merge Lists


To reference a collated List:

  1. Identify the field code for the collated List(s), either in the Property Editor or by clicking Show Logic.

    Logic_in_Property_Editor.jpeg

    Logic_in_Merge.jpeg

  2. In sections of your workflow following the Merge, reference the List(s) in braces.


    Details_braces.jpeg

 

What will my user see?


Dynamic List reference in Document Builder

Looking at the name and age example above, if you did not add a condition, or if the age given was not greater than or equal to 25, your user will see:

John_Knightley_25.jpeg

If the age given was greater than or equal to 25, NUM274 will be excluded:

John_Knightley__25.jpeg

Dynamic List reference outside of Document Builder

Again referring to the name and age example above, if you did not add a condition, or if the age given was not greater than or equal to 25, your user will see:

Screen_Shot_2019-08-14_at_15.43.34.png

If the age given was greater than or equal to 25, NUM274 will be excluded:

Screen_Shot_2019-08-14_at_15.43.59.png

 

When would I use Merge?


The Merge block has a wide range of uses, but to help people who are looking how to improve we have developed an example of a common use-case for Merge.

 

Example - Looking up a value from a table (similar to VLOOKUP):

When you are storing information in COMP tables, you may want to retrieve particular information based on previous entries (similar to how INDEX-MATCH or VLOOKUP works in Microsoft Excel).

mceclip0.png Scenario:

In this simple example, I would like to retrieve the email of someone from a COMP table, based on which person I select in a FORM block.

mceclip4.png

In this case, once I select whose email I would like to retrieve in the first form using a RADIO Button, and once I do so the next page I see will just display that selected person's email.

mceclip3.png

How this works:

The key to this system working is the COMP tables and the MERGE in-between the FORM and STMT blocks.

The first COMP table stores the relevant emails (as displayed below):

mceclip5.png

After this first COMP is the MERGE block. When you click on the MERGE block in the studio, the following will appear on the right-hand side:

mceclip6.png

This Section allows you to create a list containing items based on whatever condition you like. For this use case, we want to make it so that only 1 item is pulled into the list (i.e. pull in Adam's email when we select 'Adam,' or George's email when we select 'George.')

In this example, we set these conditions by the using 'RAD69 == "Adam"' and 'RAD69 == "George"' in the 'Condition' field.

Once you have done this, you will end up with a LIST (in this case LIST67) containing only one item.

However, we want the email to appear as a normal piece of text, rather than a list (otherwise it will appear to have a dot-point before it when displayed in the STMT block).

To remove this dot-point, declare the LIST variable in the second COMP table (after the MERGE), and reference the cell
 mceclip8.png

Now, when you reference COMP58_A2 in the STMT block (i.e. type {{COMP58_A2}}), you will end up just with the desired email (adam@checkbox.ai in the case above).

 

Note:

  • This method can be used to pull a particular subset of values from Forms as well. Just replace the COMP table with a FORM block and change the conditions to whatever you would like.