Child data not exporting to pdf template

Hi.

Also new to AppSheet. Would be great if someone could help me understand the problem and also maybe point me in a direction. Struggling with this for a week now.

I built an app that works fine except for the pdf workflow report. It is used for inspections. Allows the user to create multiple projects (parent called ProjectDetials) , and have mulitple photos (child called Images&Comments) for each project. After the inspection it emails the report in pdf format. This works fine.

So i want each user to be able to customize their report with their details company name,logo etc.

So i added another child table (CompanyDetails) to the same parent table (same as above).
Now I have one parent table with two child tables.

Testing revealed.

The one inspection project have have about 66entries and prints both child table data in the workflow report. Image showing success result.

But for the other inpsection projects with much less data entries (less than 20) it only prints the first child table (Image&Comments) data, and ONLY the HEADINGS of the second child table (CompanyDetails) with. Image showing failed result.

Please post screenshots of the templates involved.

1 Like

I’ll really like you to solve the above as I have a similar issue… “Displaying report (in tables) for a Master --detail…”
I have seen the documetation for <<>> start expression and <> …with Appsheet videos yet still can’t make a tabluar report because for me its not clear

Using the popular Ilustration Master(Order Table) - Details(Order Details Table)
a. how would you write a list of drinks in the Order details ?

<<Start : OrderDetails[drinks]>> <>

?
or << start: Select (OrderDetails[drinks],(order[orderID]=orderdetails[orderid]))>>

i try both and i get “the expression has to return ref value”

b. how would you write a report of list of order times

…super confused,…sorry to rant

Hi Steve. Thank you for taking interest. This is the template.

1 Like

Still figuring stuff out myself :slight_smile:
Hopefully the template I uploaded will help; seems like an answer to your question.

1 Like

where’s the template ?

Probably, mistakenly sent a private message to Steve. Here is the link to the image template.

Thank you for posting the template; I see no obvious problems with it. That the report populates the second table for at least one parent but doesn’t for at least one other suggests the parents for which it doesn’t populate the second table don’t actually have anything in their Related Company Details column.

I’m concerned your parent/child relationships might not be appropriate for what you’re attempting. I’d guess that there might be multiple projects per company, but the way you appear to have your data setup won’t accommodate that. Rather than having a Ref column for each company that points to the project as it appears you have now, each project should have a Ref column that points to its company.

2 Likes

I am having the same issue here. I had to add the word “Related” to my google doc page that was created and my parent/child relationship is set up exactly like it is for my reports which works. The issue I am having is only on workflows that trigger when it is set to adds only. I also have the key using uniqueid() as the initial value in my parent which is the row that the child relates to. I cannot use this formula as the app formula. I am wondering since the key is not calculated until after saving the file is the reason why it is not working. Thoughts?

1 Like

Thank you Steve I now understand my problem. Occam’s Razor :upside_down_face:
I actually feel silly.
My CompanyDetail table had one record that referenced only the one project (the one that worked).
The solution is actually so easy.
I swopped the parent/child relationship for CompanyDetails and ProjectDetails.
So I had to go to ProjectDetail Table, add a column ref [Company Link] which references the CompanyDetail Table.

In the template:
I removed the table for company details and reference the CompanyDetail Table data individually as such, <<[Company Link].[Website]>> etc.

See attached template.

1 Like

Nicely done!

Exactly @Christopher_Williams ! Adds_only trigger doesn’t gather child rows in Start/End. I spent a lot of time on this and documentation should be clear about.