Working with Conditions

Working with Conditions

Table of contents

Overview

Conditions let you show different sets of content based on what value a user enters in a particular field. For instance, if the age field in your document must contain a value above 13, you can insert a condition for it.

When a number above 13 is entered, the condition is fulfilled and a text of your choice appears on the screen. On the other hand, when the value is lesser than 13, the condition is not fulfilled and again a text of your choice will be displayed.

How to insert a condition?

  1. Click Condition under 'Advanced Fields'.
  2. Select the field for which you want to set up condition(s) from the dropdown list.
  3. Note: Only the fields which you have labelled will appear in the dropdown list.

  4. Select a condition from the dropdown list.
  5. Specify the condition here and click Insert.
  6. You can see the condition that has been set up in the document as shown and you can add the necessary content to be displayed.

Check out the following video where we have explained how to insert a condition with an example.

Conditions for subforms

Generally, when you insert conditions, only the main fields are shown in the dropdown list.

If your merge document requires inserting conditions in subforms, follow these steps for the subform fields to be listed in the Insert condition dialog box:

  • Place the cursor anywhere on the subform region and click conditions.
  • You can now see all the subform fields listed.
  • Specify your condition and click Insert.

Show/hide rows using conditions

With row conditions, you can show or hide a particular row in a table based on a logic. In other words, when a condition is not fulfilled, one entire row from the table is hidden.
A store that wants to offer a cash discount for a particular type of product or for a particular price range, can do it with the aid of row conditions.

Let us see how this can be done with an example.

Zylker Pastries wants to offer a 20% cash discount for products purchased above INR 500 using row conditions.

  • Create a template according to your requirements.
  • Place the cursor in the table cell where you want to apply this condition.
  • In this example, the table row with Discount is where the condition should be applied.

  • Now click conditions under "Advanced Merge Fields".
  • The following dialog box opens.
  • Check Row condition. Specify your condition and click Insert.
  • You can edit or delete the row condition that has been inserted by right clicking the table cell in which it has been inserted.
  • Click Save & Proceed.
  • Preview the merge after inserting a row condition.
  • In the above preview, the first bill contains "red velvet cake" which costs more than INR 500 and therefore is eligible for a discount whereas the other bill contains a product that costs less than INR 500 and hence no discount can be availed.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohowriter.com