Use complex criteria to decide if you want to process records or show/hide Paragraphs, TableRows or Tables.
In below document, there are three examples which will show how to use criteria on TABLE_ROW, PARAGRAPH and TABLE Config type.
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.
- Create Data Source to fetch Opportunity Products as shown below.
- Create Doc Config as shown below.
- Open PDF Builder and load the Data Source. Upload the template in the Doc Config.
- Create Config types as shown below.
- Add Criteria to TABLE_ROW Config type as Product2.Family=’Hardware’ to fetch only Hardware products as shown below.
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.
Add Criteria as shown below.
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.
To achieve this, follow below steps.
- Create Data Source which will say if customer has opted for Bronze SLA or not as shown below.
- 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.
  Â
- 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.
- Create TABLE Config tpye as shown below with the criteria added as shown in below screenshot.
Â
Â
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.