Chapter 03
The three tables
Your document lives in three small tables: one row for the document, a row per section and a row per paragraph. Names are matched exactly, so copy and paste them.
Pega 24 – 26
Words you will meet
- Content Type
- Content Section
- Content Paragraph
Phase 3 · Step 7
Define the document.
In App Studio, open Data → Document Content Type → + Add record and add one row:
| Field | Value |
|---|---|
| Code (required) | DOC0003 |
| Description | Payment Reminder |
| Header Footer Paragraph ID | Leave blank for now |
| Style Paragraph ID | Leave blank for now |
| Is Active | true |
Phase 3 · Step 8
Define the sections.
Add one row per section. The example uses three sections, for a standard letter: a start, a body and an end.
| Code | Section name | Document ID | Sequence | Is active |
|---|---|---|---|---|
| SEC0001 | LETTER_START | DOC0003 | 1 | true |
| SEC0002 | LETTER_BODY | DOC0003 | 2 | true |
| SEC0003 | LETTER_END | DOC0003 | 3 | true |
Phase 3 · Step 9
Define the paragraphs.
Each paragraph row maps a section to a Pega Paragraph Rule. One section can hold several paragraph rows, and that is exactly how conditional branching works: put every candidate paragraph in the same section, mark it Is Conditional = true, and let the decision table pick which one renders.
| Code | Section name | Paragraph ID | Seq | Is conditional |
|---|---|---|---|---|
| PAR0101 | LETTER_START | PR_Salutation | 1 | false |
| PAR0102 | LETTER_BODY | PR_BodyStandard | 1 | true |
| PAR0103 | LETTER_BODY | PR_BodyGold | 2 | true |
| PAR0104 | LETTER_END | PR_Closing | 1 | false |
- Rows with
Is Conditional = falsealways show. - Rows with
Is Conditional = trueshow only when the decision table says so. - Rows in a section show in
Seqorder.
Your turn
Questions and comments
Stuck on something, or have a thought? Write it here. To talk about one part, use the Comment button under that section's heading.