Struggling to attach image to PDF from grandchild table

Hi, I think this is a simple issue but I'm having trouble with it.

I have a Parent Table titled "Trip" and Id Column "Trip ID"

Child Table titled "Trip Expense" and Id Column "Trip Expense ID"

Grandchild Table titled "Expense Receipt". Id Column for this is "Expense Receipt ID" and "Expense Receipt Photo" is a picture of the receipt.

I'm trying to send a PDF with the expense report and include the images of the related receipts.

How do I write the expression?

Solved Solved
0 6 131
1 ACCEPTED SOLUTION

It's hard to help with no real-life use case.
But in general, you may need to explain at least your table's schema.

Since it's grandchild I suggest you to do 2 Start: expressions, one nested inside the other. This assumes that you have "[Related whatever]" List columns and you are executing this as an non-scheduled report or a ForEachRowInTable trigger

 

<<Start:[Related Children]>>
<<Start:[Related Grandchildren]>>
<<[ImageColumn]>>
<<End>>
<<End>>

 

 This will add as much images as grandchildren there are for the current parent

View solution in original post

6 REPLIES 6


@michael12 wrote:

How do I write the expression?


Share us the progress you have made so we can suggest anything different if it doesn't work

The PDF task has table "Trip" as the selected table for "What entity table does this task work against?"

<<Start:[Related Trip Expenses]>><<[Expense Receipt][Expense Receipt Photo]>><<END>>

Results in this: Expense Receipt::Expense Receipt Photo_Images/image.jpg

<<INDEX(Expense Receipt[Expense Receipt Photo], 1)>>

Includes an actual photo, but not necessarily the one associated with the receipt, just the first one listed.

Can you share all of your expressions? I mean, your whole template?
Start: expressions are context-aware, so it means a lot where they are located.

You can nest as much Start: expressions as you need

My template/app is in a different language unfortunately.

In general, if my template is based off the parent table, and I am trying to include an image from a grandchild table, what general expression should I use, assuming the template included nothing other than the image?

It's hard to help with no real-life use case.
But in general, you may need to explain at least your table's schema.

Since it's grandchild I suggest you to do 2 Start: expressions, one nested inside the other. This assumes that you have "[Related whatever]" List columns and you are executing this as an non-scheduled report or a ForEachRowInTable trigger

 

<<Start:[Related Children]>>
<<Start:[Related Grandchildren]>>
<<[ImageColumn]>>
<<End>>
<<End>>

 

 This will add as much images as grandchildren there are for the current parent

It worked!! Thank you so much. I just spent hours banging my head against the wall trying to figure this out. ๐Ÿ™๐Ÿ™

Top Labels in this Space