Hi There - The following template placeholder...

Hi There - The following template placeholders/expressions will print each Parent, followed by their children:

<<Start: Parents(ParentID)>><> <<Select(Children[ChildName], [ParentID]=[_Thisrow-1].[ParentID]>>

However, the Children will be listed one after the other, separated by commas, ie:

Parent Child1, Child2, Child3

Is there a way for the Children to be listed with line feeds, like this?

Parent Child1 Child2 Child3

From what Iโ€™ve learnt about the workflow-template-pdf process, I think this could be tricky, but I thought Iโ€™d ask.

0 18 636
18 REPLIES 18

Have you tried another Start/Edit formula inside the main Start/End?

@Aleksi_Alkio

That looks very promising.

Can you share the code?

Create a 1x1 table inside of the main table (inside of the cell) and add that Child Start/End formula there.

That was some pretty impressive lateral thinking on your part!

Thank you.

Iโ€™ll try it later, today.

Youโ€™re welcome

@Aleksi_Alkio

Could you share the embedded Child Start/End expression you used?

It will save me a lot of trial and error.

 

@Aleksi_Alkio

Thanks. I figured that your [Related Inspections] is the virtual column in your Parent table that holds the list of related Child rows for each Parent row.

Just so someone else reading this understands that.

Correct

@Aleksi_Alkio

Hi Aleksi - Iโ€™ve been trying a number of ways of nesting Start/Ends.

When they are inside a table, I keep getting errors.

The best I have done, so far, is to have each Parent columns in a single row template table, with the related Child rows on separate lines underneath, and for this to repeat for all Parent records.

I did this by having the initial โ€˜Parentโ€™ <> above the template table and all the Parent columns within the template table, then the โ€˜Childโ€™ <<Start/End>> template under the template table, then the final โ€˜Parentโ€™ <> under that.

Whenever I try to have the nested โ€˜Childโ€™ <<Start/End>> within the template table, I get errors where Appsheet canโ€™t recognise the Parent columns.

So frustrating, but then printing database info always is!

@Aleksi_Alkio

So you donโ€™t think it is possible to have a nested โ€˜Childโ€™ template show each Child on a separate line, within a โ€˜Parentโ€™ template table?

I can understand that the formatting would be difficult.

 

 

@Aleksi_Alkio

Yes, Iโ€™d managed to do that (image1), as well as having the child rows ([Measure]) in the table, but separated by commas, rather than on separate lines (image2), but I canโ€™t produce something like the mock-up, below (image3).

I guess Iโ€™m trying to emulate how a pivot table would present information, which I suspect is not possible in Appsheet at this stage.

How aboutโ€ฆ

I havenโ€™t tested in that way but at least you can do that if you create a simple table for your child records.

Top Labels in this Space