Get weekly updates
straight to your inbox
Submit your email address to subscribe.
Today, I’m excited to share one of the true “dark arts” tricks that we have up our sleeves over here at Conga. One of the most common requirements we see, particularly with Word templates, is the need to show or hide content on a dynamic basis. This might include merge fields, static text, entire tables, line items – you name it. IF fields are a good standby, and so is the TableHide feature. However, a certain mystical technique that we have internally dubbed “rowburner” is one of the most useful ways to make specific rows of a table, or entire sections of a document, completely disappear based on logical criteria in Salesforce.
Rowburner is the most politically correct name for this little trick, but we’ve also taken to calling the technique HOTFUR, which stands for:
Fun fact: we actually have a conference room named HOTFUR at Conga HQ in Colorado. But without further ado, let’s get to burning some rows.
There are two main things required to enable rowburner. First, you need to create Salesforce reports or SOQL queries that are filtered so that they either:
1) Display records – the report or query returns rows
2) Don’t display records – the report or query returns no rows
Essentially, you’ll want to filter in a way so that the dataset gives you a Boolean value. Let’s look at a very basic example of how this works.
I’ve created an Opportunity with three associated line items. Each one is a product that belongs to a different product family: apps, services or training.
I’ve also created three ‘Opportunities with Products’ reports, each filtered for a dynamic Opportunity ID and a hardcoded product family:
When my Opportunity has products in all three families, the results aren’t very exciting. Each report returns the relevant line items, and they’re all merged into the table in a predefined order:
However, if products are removed so that one of the reports returns no rows (no products in its defined product family), rows start to disappear:
Rowburner doesn’t have to just remove table rows, however. Placing any content (text, merge fields, entire tables, images, etc.) between your TableStart/TableEnd tags that reference the same Boolean-style reports or queries will either show the content or completely decimate it. If there are no products in the services product family, we get results like these:
It’s kind of fun laying waste to elements of a Word doc…gotta love the smell of burnt carriage returns in the morning. Those are the basic mechanics of rowburner, let’s briefly put this trick into context by discussing a few ways it makes sense to implement for real business purposes.
1) Contractual Language
Rowburner is great for displaying or destroying terms and conditions, additional provisions specific to a deal or just about any kind of contractual language that may or not apply to a particular transaction. You can reference the same report or query more than once in a document, like we did to burn the services row as well as the additional language about services in the previous example. Use this method to make your contracts “smart” and only display the information specific to the deal in question.
2) Granular Control over Line Item Placement
Conga Composer offers a feature called TableGroup that allows you to group on a specific field to create multiple tables on a dynamic basis. Sticking with the previous examples, I could TableGroup on product family to create individual tables for line items that belong to each product family, and even separate them across different pages. However, we see a lot of situations where separate tables aren’t the goal – the requirements are to keep everything inside one table and in a defined order. Granted, Opportunity Products can be sorted natively in Salesforce, so the sweet spot for this feature is when you’re working with custom related lists or more than one related list. The result is nice and “smart” thanks to rowburner and rows are merged in a predetermined order, and you can still do useful things like AutoSum the results for a dynamic calculation.
3) Additional Charges on Quotes & Invoices
Whether they’re concessions, pro-rated fees, excess usage charges or regional taxes, you can use rowburner to show/hide additional charges related to a quote or invoice. For example, if excess usage charges are being applied to a customer’s renewal invoice for a subscription service, using rowburner in your Word template can show charges anywhere the data is placed in the document if the excess usage charges are not $0.
There you have it, rowburner in all of its glory. Now get out there and start burning up some Word templates, and have an awesome weekend.