Skip to main content
Conga Support

Using show/hide logic for pages and sections

You can apply show/hide logic to whole content pages or sections by using Boolean statements. The upcoming sections give you the steps to make it happen—and some examples to follow.

Setting up Logic Statements

To enter logic for a page or section, follow the steps below:

  1. Hover over the page or section title in the Table of Contents panel and click the gear icon.
  2. Click Edit Properties.
  3. Enter the boolean statement at the bottom of the pop-up window in the Include Logic field.

Page Logic Examples

Document Scripting requires you use only lowercase letters. In the upcoming example, the actual variable is Opportunity_Name, but when using the .include? method, you use opportunity_name.

Single Variable

  • Opportunity_Name = “Test Opportunity”
  • You can check whether a variable includes certain text by using the following method: opportunity_name.include?(“Test”)
  • Result: Because our Opportunity_Name includes the text “Test” the example returns true.

Arrays: Include

  • The method .include? on an array looks for an exact match of the value in the variable you’re searching. If no exact match can be found, the method will return: false and the content will “hide”
  • products = [{Name = “Test product”}, {Name = “GenWatt 1000”}, {Name = “Product 2”}]
  • Results:
products.include?(“Name”, “product”) = content will NOT show
products.include?(“Name”, “Test product”) = content will show
products.include?(“Name”, “GenWatt 1000”) = content will show
products.include?(“Name”, “GenWatt”) = content will NOT show
 

Arrays: Like

  • The method .like? on an array determines whether the value is contained in the variable you are searching.
  • products = [{Name = “Test product”}, {Name = “GenWatt 1000”}, {Name = “Product 2”}]
  • Results:
products.like?(“Name”, “product”) = content will show
products.like?(“Name”, “Test product”) = content will show
products.like?(“Name”, “GenWatt 1000”) = content will show
products.like?(“Name”, “GenWatt”) = content will show
products.like?(“Name”, “Products”) = content will NOT show
  • Was this article helpful?