Skip to main content

How can I link to all the files in an attachment field?

My field contains multiple files. How do I choose which to load if there are multiple files present?

Updated this week

This automation generates individual URLs for each file in the attachment field. You can modify the index in the URL to access a specific file within the field. The index begins at 1. Here is an example URL.

https://web.miniextensions.com/api/public-attachments/l9v2rOh9nqDPG1z8OVzi/rec1xGA04dDbrQjxb/1

You just need to change the number at the very end of the URL to change the index, which will in turn give you the 1st, 2nd, 3rd etc. attachment in the field.

How to include links to several attachments in the same field

The automation provides a formula that will generate links for the first up to 5 files in the field. If your field may contain more than 5 files you can expand the formula as needed. For each additional file you need to cover, the block you add to your formula would look something like this (this example shows the 6th link):

& IF(IF(fldRTREhdsGaNTu4H=BLANK(), 0, LEN(fldRTREhdsGaNTu4H)-LEN(SUBSTITUTE(fldRTREhdsGaNTu4H,",",""))+1)>=6, ' https://web.miniextensions.com/api/public-attachments/35E6eQgFZsEVHolixH1T/' & RECORD_ID() & '/6')

To expand your formula, simply copy the appropriate block from the formula generated by your automation (not the block from this example) and replace the number 6 highlighted in bold above with the number of the attachment you want to link to. Say, if you have up to 10 files in your attachment field, you'd add this block five times to the end of the pre-generated formula, replacing the index with 6, 7, 8, 9, and finally, 10.

What is the impact on existing URLs that do not include the index?

If the URL does not include the index number, it will function as before and display the first file in the attachment field. You can just add the new parameter in your existing URL if you want to change it to another file in the field.

Did this answer your question?