ColumnHide in Word
Similar to the TableHide special merge field, you can use ColumnHide to hide individual columns that contain no data from the corresponding report or query dataset. Include one of the below examples in the header column you wish to be removed. ColumnHide can be used in conjunction with data from Master Datasets and with multiple datasets from Reports/Queries.
This feature must be used in conjunction with the platformcomposer=1 parameter in your Composer button solution.
ColumnHide via DataSetName
Syntax | {{ColumnHide:DATASETNAME}} |
Values | DataSetName is the name of the data found in Template Builder. |
Notes | Place the ColumnHide in the Header of the column you wish to hide if data is not present in the merge fields. |
Line | Discount{{ColumnHide:Contacts}} | Product | Total Price{{ColumnHide:Contacts}} |
---|---|---|---|
{{FirstName}} | {{Product_Name}} | {{Price_Total}} |
ColumnHide via Value on a Master Field
Syntax | {{ColumnHide:MasterField:Value}} |
Values | MasterField is the name of the merge field you want to evaluate (e.g. Contact_IsPrivate), as it appears in the Template Builder. Value is the value of the field that will force Composer to hide the column. |
Notes | Master fields are generated from the Master data set of the Template Builder. |
Name{{ColumnHide:Contact_IsPrivate:true}} | Product |
---|---|
{{FirstName}} | {{Product_Name}} |
ColumnHide via TableData Field Values
Syntax | {{ColumnHide:DATASET:FIELDNAME:VALUE}} |
Values | DataSet is the name of the Report/Query data as seen in the Template Builder. FieldName is the name of the merge field you want to evaluate (e.g. Oppty_IsPrivate), as it appears in the Template Builder. Value is the value of the field that will force Composer to hide the column. |
Notes | When using the merge region tags, TableStart/TableEnd, along with ColumnHide, you can hide multiple columns on same table, as long as at least 2 columns remain in the table to maintain the enclosed merge region syntax. |
Name{{ColumnHide:Opptys: Opportunity_IsPrivate:true}} | Close Date{{ColumnHide:Contacts}} | Amount |
---|---|---|
{{TableStart:Opptys}}{{Opportunity_Name}} | {{Opportunity_CloseDate \@ MM/dd/yyyy}} | {{Opportunity_Amount \# Currency}}{{TableEnd:Opptys}} |
TOTAL: | {{=SUM(Above)}} |
ColumnHide via Operational Values
Syntax | {{ColumnHide:MASTERFIELDNAME:OPERATOR:VALUE}} , {{ColumnHide:DATASET:FIELDNAME:OPERATOR:VALUE}} |
Values | DataSet is the name of the Report/Query data as seen in the Template Builder. FieldName is the name of the merge field you want to evaluate, as it appears in the Template Builder. Operator is the appropriate operator symbol for your equation (<, >, <>, =, !=). Value is the value of the field that will force Composer to hide the column. |
Notes | When using the merge region tags, TableStart/TableEnd, along with ColumnHide, you can hide multiple columns on same table, as long as at least 2 columns remain in the table to maintain the enclosed merge region syntax. |
Case Subject | Status {{ColumnHide:Cases:Case_Status:!=:New}} | Opened Date |
---|---|---|
{{TableStart:Cases}}{{Case_Subject}} | {{Case_Status}} | {{Case_CreatedDate \@ MM/dd/yyyy}}{{TableEnd:Cases}} |