Create Ticket My Tickets Post Discussion
Welcome
Login  Sign up

Hiding Rows / Sections of Your Template

CONTENTS

Sometimes, you'd like to show or hide sections of your data template based on the outcome of each Form entry's answers. For example, you may have an optional section in your Form that is not displayed or filled out depending on what the app user fills out.
 The associated data template will likely have the exact requirement - i.e., you don't want to show a section of the template when it is unnecessary.

Our platform enables you to dynamically hide rows or whole sections of your template using the syntax outlined below.


Syntax

Using the following syntax, our platform lets you dynamically hide whole sections or table rows in your custom Word or Excel template.


But before you begin, understand the result of a formula within the syntax. Ensuring the desired outcome.


True = Content Hidden
False = Content Displays


Hiding Sections


{{!HIDEIFSTART( put a formula that evaluates to True/False here )}}

"Content to be hidden."

{{!HIDEIFEND}}


Hiding Rows


{{!HIDEROWIF( put a formula that evaluates to True/False here )}}

"Row content to be hidden."


Word Templates

In Word templates, you must ensure either a space or a new line between the !HIDEIFSTART, !HIDEIFEND, and what needs to be hidden.


Hiding Sections (Word)

To hide a section, use the following to hide content between them!HIDEIFSTART / !HIDEIFEND syntax if the option answer is No.


Example:


{{!HIDEIFSTART( {{myoption}} = 'No' )}}

This is some content that will be hidden...

...and some more to be hidden.

{{!HIDEIFEND}}


Or on the same line.


{{!HIDEIFSTART( {{myoption}} = 'No' )}} Content to be hidden {{!HIDEIFEND}}


Hiding Table Cells (Word)

Demonstrating three different formulas achieving the same result. In this case, the content to be hidden is an image, but it could also be static text or form field data name placeholders.


Example:


Question

Poor

Satisfactory

Good

Q1

{{!HIDEIFSTART(NOT({{Q1}} = ‘Poor’))}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q1}} != ‘Satisfactory’)}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q1}} = ‘Poor’ OR {{Q1}} = ‘Satisfactory’)}}


{{!HIDEIFEND}}

Q2

{{!HIDEIFSTART(NOT({{Q2}} = ‘Poor’))}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q2}} != ‘Satisfactory’)}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q2}} = ‘Poor’ OR {{Q2}} = ‘Satisfactory’)}}


{{!HIDEIFEND}}

Q3

{{!HIDEIFSTART(NOT({{Q3}} = ‘Poor’))}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q3}} != ‘Satisfactory’)}}


{{!HIDEIFEND}}

{{!HIDEIFSTART({{Q3}} = ‘Poor’ OR {{Q3}} = ‘Satisfactory’)}}


{{!HIDEIFEND}}

Formula use can be within a single cell (as shown above) or contain multiple/stacked !HIDEIFSTART / !HIDEIFEND in a single cell.


Hiding Table Rows (Word)

Suppose you have rows that should only be shown when a specific answer value is given. Use the special !HIDEROWIF syntax to dynamically show/hide a given row.


Ensure the !HIDEROWIF and the content to be hidden are in a table and separate cells.


Example:


{{!HIDEROWIF( ISBLANK({{chosenProduct}}) )}}

"Row content to be hidden."

Which will hide the row if the chosen product answer is empty, not set, or blank. This formula is handy if you only want to show output if an answer is given.


Excel Templates

We use the same syntax for hiding/displaying rows in Excel as in Word, although Excel has a few differences due to its default tabular layout.


Hiding Sections (Excel)

To hide a section of your Excel template, use the !HIDEIFSTART / !HIDEIFEND syntax and the content to be hidden in separate cells.


Example:


{{!HIDEIFSTART( {{myoption}} = 'No' )}}

"Content to be hidden"

{{!HIDEIFEND}}

Or on the same row.


{{!HIDEIFSTART( {{myoption}} = 'No' )}}

"Content to be hidden."

{{!HIDEIFEND}}


Hiding Table Cells (Excel)

Unfortunately, cell-level hiding of cells is not supported in Excel. We recommend using a Word template instead for more granular control of cell visibility. 


Hiding Rows (Excel)

Suppose you have rows that should only be shown when a specific answer value is given. Use the special !HIDEROWIF syntax to dynamically show/hide a given row:


Example:


{{!HIDEROWIF( ISBLANK({{chosenProduct}}) )}}

"Row content to be hidden."

Which will hide the row if the chosen product answer is empty, not set, or blank. This formula is handy if you only want to show output if an answer is given.


Hiding Repeating Rows (Excel)

In Excel templates, you can also use a !HIDEROWIF inside a !REPEATSTART section.


The !HIDEROWIF is evaluated first before any REPEAT syntax is run, repeating and selectively hiding rows based on the formula result. 


Example:


{{!REPEATSTART}}


{{!HIDEROWIF( {{selectedanswer}} = 'Y' )}}

"Row content to be hidden."

{{!REPEATEND}}



Common Error

Expression matching between the round closing bracket of the IF condition and the closing double braces is space-sensitive.

If there is a space between them, this will cause the expression matching to fail. The HIDEIF statement won't be recognized and will be skipped.

EXAMPLE:



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.