Appsheet reference to a child table in Bot created PDF - Google Sheets

All, I am working on an app that has an end result as an invoice.

It takes items from bills and converts them to Invoices. 

The table Structure is: 

Table: [Bills] is a child set of data to table: [Parent Bill]

Then Table: [Parent Bill] is a child to Table: [Invoices] 

I need to show all the data from all the Bills on the PDF that comes from Invoices. The first screen shot is showing the working table [Parent Bill] as the primary data source with the table showing [bills] data. 

kwasco1_0-1696388715255.png

This pdf works great for bill review and partial invoice review. 

But... when I one level above to the [invoices] table, I can not get my references straight, this is what I tried, but I am lost. 

This PDF comes from the [invoices] table but should show all [bills] details from all of the [Parent bill] tables. 

kwasco1_0-1696405885649.png

kwasco1_1-1696405916614.png

kwasco1_1-1696407187273.png

 

Thanks all for the help! 

 

Solved Solved
0 9 901
2 ACCEPTED SOLUTIONS


@kwasco1 wrote:

Thank you, this is my first request to the community.


Welcome to the AppSheet community !

It is still not clear if the field names such as "QTY" ([Total Units]) etc. are from grandchild table or not. Anyway assuming those are from grandchild table, please try as below. Please share screenshots of grandchild table as well if needed.

if understanding of your requirement is correct, you wish to print all related records from the grandchild table "Bill" for an "Invoices" table record.

If so, please create  a VC called say [All Bills]  in the grandparent table "Invoices" with the following details of this VC configuration

 A) list type with 

B) element type as ref and

C) reference table name as "Bills" with

D) an app formula expression something like 

SPLIT(TEXT([Related Parent Bills][Related Bills by Parent Bill ID])," , ")

Then your template expression can be something like below

Suvrutt_Gurjar_0-1696412352280.png

This bot will invoke from the grandparent "Invoices" table.

 

 

View solution in original post

Please try

SUM([All Bills][Total Invoice])

View solution in original post

9 REPLIES 9
Top Labels in this Space