
How to Create a Parent-Child PDF Layout in AppSheet (With Real Example)
Recently, I was working on an inventory workflow where a receipt record had multiple items. The challenge? I wanted a PDF layout where the receipt header appears on top, and the child items are neatly shown in a table below. Sounds simple, right? But doing it the right way in AppSheet needs a little structure.
Let me walk you through what worked for me.
🔧 Example
In my AppSheet app, I had two tables:
- Parent Table: “Receipts”
Contains fields like:Timestamp
,Receipt Id
,Date of Receipt
,Party
,Firm
,Company
,Debit Note No.
,Debit Note Date
- Child Table: “Receipt Items”
Linked to the parent usingReceipt Id
as a Ref.
Fields include:Item
,Quantity
,Batch No.
,Manufacturing Date
,Expiry Date
,MRP
, etc.
My goal: When a PDF is generated for a receipt, it should show all parent details at the top, and then a table listing all related items.
🧾 Step 1: Create a Google Docs Template
Start by creating a Google Doc that will serve as your PDF layout template. In your AppSheet automation (bot or workflow), choose “Create a new file from a template” and connect this document.
🧩 Step 2: Add the Parent Fields
These are straightforward. Just type them out like this:
Receipt Details
Receipt Id: <<[Receipt Id]>>
Date of Receipt: <<TEXT([Date of Receipt], "DD/MM/YYYY")>>
Party: <<[Party]>>
Firm: <<[Firm]>>
Company: <<[Company]>>
Debit Note No.: <<[Debit Note No.]>>
Debit Note Date: <<TEXT([Debit Note Date], "DD/MM/YYYY")>>
📋 Step 3: Add a Table for the Child Items
In the Google Doc, insert a table (I used 6 columns) and name the headers like:
Item Quantity Batch No. Mfg Date Expiry Date MRP
Then, on the second row, write the following expressions:
<<Start: [Related Receipt Items]>>
<<[Item]>> | <<[Quantity]>> | <<[Batch No.]>> | <<TEXT([Manufacturing Date], "DD/MM/YYYY")>> | <<TEXT([Expiry Date], "DD/MM/YYYY")>> | <<[MRP]>>
<<End>>
Make sure your child table has a reverse reference virtual column like Related Receipt Items
that connects back to the parent.
🎯 Result
I now have a professional-looking PDF that shows:
- Receipt header at the top.

- A table of all items received below it.

- If you’re working with purchase orders, invoices, or multi-line item entries, this layout will be really helpful to you.