Filter Related Child table in PDF attachment

Good day All,

I believe there is a simple solution to this but, I am unable to figure it out.

I have a report that is generated from my Parent Table - Fleet information.
The report is sent when the status of the vehicle in the Fleet information table is changed from Active to Workshop.

I have a child table with vehicle issues that need attention when the vehicle is in the workshop but, I only want to send the incomplete (<> Completed ) issues to the report.
This is the CheckListLog

Hope the request is clear enough.

Solved Solved
0 19 356
1 ACCEPTED SOLUTION

In that post it is suggested to remove any line breaks in your expression, which is exactly what I was going to suggest next. You have at least one line break in the expression assistant screenshot that you posted, after โ€œORDERBY(โ€.

View solution in original post

19 REPLIES 19

3X_d_2_d2f83cc91b8c08425496c337975b6254db8cf2ab.png

This START expression here is what is controlling which records from the child table are shown in the PDF. START expressions require a list of row key values, so you just need to replace the [Related...] portion with an expression that generates the key values that you want. In your case, something like:

SELECT( child-table[child-table-key-column] , [status] <> "Complete" )

For reference:

Thanks. The SELECT() is working but, it is not filtering the issues for only the one vehicle but, it is sending a list of all issue which is <> Completed

My mistake, I steered you wrong. Instead of

You can use List-Dereference on the existing [Relatedโ€ฆ] column:

[Related...][child-table-key-column]

This is where I normally get stuck.

'SELECT(Related CheckListLog[Reported Date] , [status] <> โ€œCompletedโ€ )

My Reported date is my KEY to the child table CheckListLog

3X_0_d_0d4d299d70128eb47b5b11e9ac8d6abdac8d233e.png

3X_3_2_323e365991db1a1eab6c3cc652f45fab3ba585d4.png

If I want to Orderby Days out?

<<Start: ORDERBY(
SELECT([Related CheckListLogs][Reported Date] , [status] <> โ€œCompletedโ€ ),[Days Out])>>

Does that look right?

yes

Please show the whole template.

Thanks so much for the help @Marc_Dillon.

You are a champion

I donโ€™t see any issue.

Copy the whole START expression, without the โ€œSTARTโ€ and the angle brackets, and paste it into a new virtual column on the Table that youโ€™re triggering the Bot from. Does the expression assistant return any error?

Revert back to the working template, and slowly add the new parts back in.

It works when creating a virtual column

I came across a post of other user getting the same issue, or somewhat of the same issue.

In that post it is suggested to remove any line breaks in your expression, which is exactly what I was going to suggest next. You have at least one line break in the expression assistant screenshot that you posted, after โ€œORDERBY(โ€.

Thanks

Removing the line breaks fixed it?

Just like that!!!

Top Labels in this Space