Set dynamic display in merge templates with condition fields

How to add condition fields in merge templates

Overview

Condition fields allow you to dynamically show or hide content based on set conditions. Conditions come in handy while automating documents like contracts, proposals, or letters where certain sections only apply in specific cases. You can apply conditions to text blocks, table rows and subform regions.

Prerequisites

  1. An Automation template connected  to a data source with necessary fields involved in conditions to be added to the template (e.g., Name, Membership Type)

Steps

 A. Add conditions to text blocks

  1. Go to Automate Tabb, Click Condition under the Advanced Merge Fields section 
  1. In the popup Edit Text Conditions

    1. Choose the field .
    2. Choose the operator (equals).
    3. Enter the value to match (e.g., “Regular”).
    4. Click Insert to place the if-else block in the document,
    5. You'll now see two placeholders: <<IF block>> and optionally <<ELSE block>> as shown
  1. Hover on the sample text in IF block "content to be shown if the condition is true"and type the required text  to conditionally display your content. Similarly hover on Else block sample text "content to be shown otherwise" and type content to be placed in Else block.

B. Add conditions to show or hide table rows   

  1. Place the cursor inside the table row you want to conditionally show or hide.
  2. Click Condition under Advanced Merge Fields.
  3. In the popup:
    1. Click Insert Row Condition.
    1. Define the condition using the visual builder:
    2. Click Insert. Here's an image showing a row condition: 


C. Remove Text or Row Conditions

  1. To edit or delete the row condition: Right-click the row > Edit or Remove Row Condition.
  2. To delete text condition in blocks, select condition block as shown and press delete

Troubleshooting

1. Error/Symptom: The condition dialog condition shows options for text fields, but not for date fields.
Possible Cause: Field type might not be configured as Date.
Recommended Solution: Make sure the field type is correct in merge settings.

2. Error/Symptom: Checkbox field condition is not working.
Possible Cause: The value received for the checkbox might not match the expected configuration.
Recommended Solution: Verify the actual value returned for the checkbox field. It may be 'true', 'TRUE', or 'checked', depending on the data source. Ensure the condition matches this value exactly.

3. Error/Symptom: Condition doesn't work / content not showing.
Possible Cause: Field value could be missing in the data source.
Recommended Solution: Make sure the field referenced in the condition has a valid value for each record.

4. Error/Symptom: The table row doesn’t appear even if the condition is true.
Possible Cause: The row condition may be set incorrectly or applied to the wrong row.
Recommended Solution: Right-click the row, choose Edit Row Condition, and verify the condition.

5. Error/Symptom: Subform fields are not listed in the condition builder.
Possible Cause: Cursor could be placed outside the subform repeat region.
Recommended Solution: Click inside the subform region before opening the condition popup.

6. Error/Symptom: Date condition is not working
Possible Cause: Mismatch between the date format in the condition and data source.
Recommended Solution: Ensure the field type is set to Date in the condition popup, and match the date format (e.g., dd/mm/yyyy, mm/dd/yyyy) exactly with your data source.

7. Error/Symptom: Condition inside Repeat/Subform block doesn’t work.
Possible Cause: Field used in the condition is outside the block's scope.
Recommended Solution: Use only fields available within the subform or repeat block when defining the condition.

8. Error/Symptom: I can’t hide the subform table heading when subform table is empty; Merge Preferences only hides the subform table.


Workaround: Add a row with table header as part of repeat table and set merge preference as "Do not Show Table, if all rows are empty"



9. Error/Symptom: Unable to simulate else-if in conditions.
Possible Cause: Zoho Writer does not support else-if directly.
Recommended Solution: Create multiple independent if-else blocks with mutually exclusive conditions as shown:

If Client_Type == "Premium"
    Show: "Welcome, Premium Client!"
Else
    If Client_Type == "Basic"
        Show: "Please consider upgrading to Premium."
    Else
        Show: "Hello, Guest! Sign up today."

  1. Watch : Using Conditions in Merge Template
  2. How to use date based conditions in Writer

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure Forms

                              WCAG

                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now






                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                                   
                                                                    

                                                                  Videos

                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now










                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources