PDF Butler - Nested Parent Child DataSources

3 min read 1 month ago
Published on Aug 03, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of using nested parent-child data sources in PDF Butler. You will learn how to set up various configurations to replicate tables and rows, linking opportunities with their respective products. This is beneficial for generating structured documents that reflect relationships in your data, making it easier to present information clearly.

Chapter 1: Intro to Examples and DataSources

  • Understanding DataSources:

    • You will work with two data sources:
      • Opportunities: This data source selects all opportunities related to a specific account.
      • Opportunity Products: This data source selects all products linked to each opportunity.
    • Key Fields:
      • Opportunity ID links the parent data source (Opportunities) with the child data source (Opportunity Products).
      • Ensure that the fields used for linking have consistent names for easier configuration.
  • Creating DataSources:

    • Use the sole Builder to create your data sources.
    • Select necessary fields: Account ID, Opportunity ID, Opportunity Name, and Amount for opportunities.

Chapter 2: Repeat Table with TableRow

  • Setting Up the Parent Table:

    • Identify the table using the merge field for Opportunity Name.
    • Configure the data source as a table type, linked to your opportunities data source.
    • Ensure a single spacing between tables.
  • Adding Child Data Sources:

    • Create a new child configuration for Opportunity Products.
    • Include fields for:
      • Product Name
      • Quantity
      • Total Price
  • Saving and Testing:

    • Save your configurations and upload your document to see the replicated tables for each opportunity.

Chapter 3: Repeat TableRow with Paragraph

  • Configuring the Table Row:

    • Create a configuration type for table rows using your opportunities.
    • Add a child configuration for paragraphs to include product details.
  • Setting Up Product Details:

    • Use merge fields to link product names and ensure they appear succinctly in the document.
    • Save the changes and test the layout to verify correct replication.

Chapter 4: Repeat Table with Paragraph in Cell

  • Adjusting Table Configuration:

    • Identify your table and set it to refer to your opportunities.
    • Include a merge field for Opportunity Name and Amount.
  • Adding Paragraphs in Cells:

    • Create a new child configuration of type paragraph for the product data.
    • Link the paragraphs to the product names to organize the details effectively.
  • Testing Layout:

    • Save the document and conduct a test to ensure the layout reflects the desired structure.

Chapter 5: Repeat Table with Two Rows

  • Using Rows Controller:

    • Select the two rows you want to replicate and apply a Rows Controller for easy management.
    • This allows you to replicate both rows for each product linked to the opportunity.
  • Finalizing Configuration:

    • Set up the parent table with necessary merge fields and specify the child data source for opportunity products.
    • Include fields for product name, quantity, and total price.
  • Final Testing:

    • Save your work and generate the document to confirm that both rows replicate correctly for each opportunity.

Conclusion

In this tutorial, you learned how to effectively utilize nested parent-child data sources in PDF Butler to create structured documents. By following the step-by-step approach, you can replicate tables and rows, ensuring that your data is organized and visually coherent. Next steps may include experimenting with additional configurations or integrating other data sources to enhance your document generation capabilities.