The TableHide:Master parameter hides a table in a Word template based on a field value on the master (primary) Salesforce record. When the document is generated, Docs Made Easy compares the field with the value you give, using the operator you choose. If the condition is true, the whole table that contains the parameter is left out of the document.

Syntax

{{TableHide:Master:FieldName:Operator:Value}}

Values

ComponentEffect
FieldNameThe field on the master record to check, for example StageName.
OperatorHow to compare: equals (=), not equal (<>), greater than (>) or less than (<).
ValueThe value to compare with, for example Closed Lost.

When the condition is true, the table is hidden. When it's false, the table appears as usual.

= and <> work in TableHide:Master. They don't work in native conditional statements, which use EQ and NEQ instead.

Where to add it

Put the tag inside the table you want to hide, for example in a header cell. It must be inside a table.

Example

An opportunity's line item table should be left out when the deal is lost.

Template:

Product name {{TableHide:Master:StageName:=:Closed Lost}}QuantityPrice
{{TableStart:Opportunity.r.OpportunityLineItems}}{{Name}}{{Quantity}}{{TotalPrice}}{{TableEnd:Opportunity.r.OpportunityLineItems}}

Output:

Opportunity stageResult
Closed WonThe line item table appears.
Closed LostThe whole table is left out.

When the opportunity stage is Closed Won, the table appears:

Generated document showing the line item table for a Closed Won opportunity

When the stage is Closed Lost, the table is hidden:

Generated document with the line item table hidden for a Closed Lost opportunity

Works in

The example on this page uses a Word (DOCX) template.

Combine with

Common errors

  • The tag shows as text and the table isn't hidden. The tag isn't inside the table, or Word split it with mixed formatting. See Merge fields are blank or show as {{…}} text.
  • "No such column" on the field. Use the field's API name, such as StageName, not its label. See DME-SF-002.
  • A template syntax error. Check that every part, including the operator and value, is present. See DME-TPL-000.