Conditional Logic for Data Merges

Updated on:
July 28, 2021

The conditional logic is a great setting if you only want to create documents for certain rows within a spreadsheet.

In this article you’ll learn how to:

  1. Set up a condition
  2. Advanced settings for conditions

How to set up a condition

If you would like to set up a condition for a data merge, all you need to do is go to the Data Merge box and select 'condition' in the drop down menu.

After you have selected condition, the next step is to select the field the condition is based on. Open the next drop down menu and select the field. If the fiedl you want is not there you might have to click refresh in the the top right hand corner on the data sources table.

After that enter the value the field has to equal for the automation to run and bam! You're done :)

How to add advanced settings for conditions

It is possible to add a more advance filter that is based on two conditions (or a different operator other than 'equal') by adding another column to your spreadsheet. In this new column you can add a formula that contains the advanced conditions and then use the result of this column for the data merge. For example you could use a formula that looks like this:

=IF(AND(A4="apple",B4="orange"),"Merge","")

Then you could set the condition in Portant to Merge based on when this column equals 'Merge'.

This is quite a good guide on using 'IF' & 'AND' functions together:
https://infoinspired.com/google-docs/spreadsheet/combined-use-of-if-and-or-logical-functions-in-google-doc-spreadsheet/


Feedback and feature suggestions

We created Portant only a few months ago, so any feedback or suggestions you have for us would be greatly appreciated. Please feel free to send us an email at contact@portant.co or use our contact form here: https://www.portant.co/support

Thanks,

Blake and James

More than mail merge

You can do a lot more than just mail merge with Portant. Portant is a fully-fledged online document automation solution that can optimise many different document flows. You can use our online document automation platform to optimise your repetitive work, so you can get back to doing the work you enjoy.

Get startedAn animation showing a google document being created from a Trello card.