Child data not exporting to pdf template

currenkh
Participant I

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.

Solved Solved
0 12 1,320
1 ACCEPTED SOLUTION

Thank you Steve I now understand my problem. Occamโ€™s Razor
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.

View solution in original post

12 REPLIES 12

Steve
Participant V

Please post screenshots of the templates involved.

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

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

whereโ€™s the template ?

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

currenkh
Participant I

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

Steve
Participant V

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.

Thank you Steve I now understand my problem. Occamโ€™s Razor
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.

Nicely done!

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?

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.

hi Currentkh,

 

How to make all Image in the Child Table Showing in PDF Report?

I have same Template with you,  but Only 1 Same Image show up in the PDF.

this is the PDF Report.

Tanoto_0-1648000591794.png

This is the Template

Tanoto_1-1648000921943.png

Maybe you can help me to show the problem? 

Top Labels in this Space