---
title: Criteria
description: "Use complex criteria to decide if you want to process records or show/hide Paragraphs, TableRows or Tables. [Criterias on Paragraph, Table and TableRow ConfigTypes](https://www.youtube.com/embed/A7KPJZrBh0M?si=MK1ymxsSQ1f5TzcL) In below document, there are three examples which will show how to use criteria on TABLE_ROW,…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-configtype/criteria/"
updated: "2025-06-10"
category: PDF BUTLER BY CONFIGTYPE
---

# Criteria

Use complex criteria to decide if you want to process records or show/hide Paragraphs, TableRows or Tables.

[Criterias on Paragraph, Table and TableRow ConfigTypes](https://www.youtube.com/embed/A7KPJZrBh0M?si=MK1ymxsSQ1f5TzcL)

In below document, there are three examples which will show how to use criteria on TABLE_ROW, PARAGRAPH and TABLE Config type.

![CRITERIA Screenshot1](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot1.png)

##### Example 1: Criteria on TABLE_ROW

Let's say you want to show opportunity products that are Hardware in a Table. You can use TABLE_ROW Configtype and add Criteria to achieve this.

1. Create Data Source to fetch Opportunity Products as shown below.![CRITERIA Screenshot2](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot2.png)
2. Create Doc Config as shown below.
    ![CRITERIA Screenshot5](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot5.png)
3. Open PDF Builder and load the Data Source. Upload the [template](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Template-1.docx) in the Doc Config.
4. Create Config types as shown below.
    ![CRITERIA Screenshot6](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot6.png)
5. Add Criteria to TABLE_ROW Config type as Product2.Family='Hardware' to fetch only Hardware products as shown below.
    ![CRITERIA Screenshot7](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot7.png)

##### Example 2: Criteria on PARAGRAPH Config type

Let's say you want to show Products which are not Hardware as paragraph list. This can be achieved using PARAGRAPH Config type with adding Criteria as Product2.Family<>'Hardware'

In the same Doc Config created above, create below config types.

![CRITERIA Screenshot8](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot8.png)

Add Criteria as shown below.

![CRITERIA Screenshot10](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot10.png)

##### Example 3: Criteria on TABLE Config type

Let's say there is a Table block which shows the discount for GOLD SLA product. This block should only displayed if the Customer is a New Customer and he opted for Bronze SLA.

![CRITERIA Screenshot1](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot1-e1747389107711.png)

To achieve this, follow below steps.

1. Create Data Source which will say if customer has opted for Bronze SLA or not as shown below.
    ![CRITERIA Screenshot3](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot3.png)
2. Create one more Data Source to fetch if the Customer is a New Customer or not as shown below. Make Sure to add Type field in the SOQL Query.
    ![CRITERIA Screenshot4](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot4.png)     
3. Open same Doc Config created in previous examples and load the data sources. After adding the Has Bronze SLA Data Source, make sure to add 'HasBronzeSLA' field which was added as alias in your SOQL query as shown below.![CRITERIA Screenshot12](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot12.png)
4. Create TABLE Config tpye as shown below with the criteria added as shown in below screenshot.![CRITERIA Screenshot9](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot9.png)  ![CRITERIA Screenshot11](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot11.png) 

Open any opportunity and Edit the page to add Doc Config Id. Generate the document and it will be as shown below. If the customer is not a New Customer, then the discount block will be hidden.

![CRITERIA Screenshot13](https://pdfbutler.com/wp-content/uploads/2023/08/CRITERIA-Screenshot13.png)
