Other Attachments from different table

Hi Guys.
I am following the document โ€˜Email Other Attachmentsโ€™.
The parent table is โ€˜qryTransportโ€™ which contains no images.
The child table is โ€˜AppQuotesโ€™, in this table I have setup an EnumList field containing the names of the 4 Image fields of this same table (Image1, Image2, Image3, Image4).
My workflow is triggered from qryTransport, how do I pull the images from Appquotes and attach them to the email output from qryTransport?

Kind Regards

0 18 768
18 REPLIES 18

Hi @Dave_Willett Did you do a test run. Usually, related child tables will be included automatically.

Hi Lynn. Iโ€™m not sure what to put in the โ€˜Other attachmentsโ€™ field so Iโ€™m a bit stuck now.

This is what I have so far:
LIST(IF(CONTAINS([Attachments], โ€œImage1โ€),โ€œImage1.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage2โ€),โ€œImage2.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage3โ€),โ€œImage3.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage4โ€),โ€œImage4.pdfโ€,""))

But I get 'Unable to find column โ€˜Attachmentsโ€™

Sorry I have not used โ€œOther attachmentsโ€ Hopefully someone else will be able to help.

Donโ€™t worry Lynn, thank you anyway

Are your files fixed ones in your data source? And do you have only one child record for one parent?

Hi Aleksi. They are images which are generated from the appquotes form:
2X_3_355a0296ffc4a1abaa0744b722dbb0fc031ab97c.png
I added an โ€˜Attachmentsโ€™ column set to enumlist.
2X_2_295a92337449d983e839872bdc7ff9fc44af2a15.png

The workflow is triggered from qryTransport.

Only one child record per parent?

Iโ€™m not sure if I understand completely Aleksi. There are 4 columns in โ€˜AppQuotesโ€™ as above. Should there be 4 records in the parent โ€˜qryTransportโ€™ too? If so should there be a formula for each image column in the parent as a ref?

Cheers

You are using related table structure where the โ€œqryTransportโ€ is a parent and it has child record in โ€œAppQuotesโ€ table. Because of the structure, you could have more than just one child. My question wasโ€ฆ do you have only one child per parent or is it possible that the parent record will have more child records that just one?

There will be more child records Aleksi. Thanks

And you would like to attach them all when the parent record is triggered?

Yes Aleksi that would be ideal.
Thanks again

You can use something like INDEX([Related AppQuotes][Image1],1) for one Attachment row. Because you donโ€™t know how many child records you will have, you should add quite a lot other attachments rows to your Workflow.

Thanks Aleksi
[Related AppQuotes] is that a ref field in qryTransport, if so, for each image I create a new virtual column in qryTransport as follows:

INDEX([Related AppQuotes][Image1],1)
INDEX([Related AppQuotes][Image2],1)
INDEX([Related AppQuotes][Image3],1)
INDEX([Related AppQuotes][Image4],1)

and then:

LIST(IF(CONTAINS([Attachments], โ€œImage1โ€),โ€œImage1.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage2โ€),โ€œImage2.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage3โ€),โ€œImage3.pdfโ€,"")) + LIST(IF(CONTAINS([Attachments], โ€œImage4โ€),โ€œImage4.pdfโ€,""))

in Other attachments of the workflow?

Just making sure here, thanks again

Actually no. You can add only one image into one Other Attachment row. Using a list, doesnโ€™t seem to work.

For example writing a formula like SELECT(ChildRecords[Image1],[PARENT_ID]=[_THISROW].[ID]) wonโ€™t work.

Thanks Aleksi as ever, Iโ€™ll do some testing over the weekend.
Have a great weekend

Youโ€™re welcome

Top Labels in this Space