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 755
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