Attachments duplicated in fori

In our coding (below), when attaching a file under the “custom.some.thing” group in the fori loop, it also shows this in the second selection “custom.some.thingy” file attachment.

Is this due to it being a file collection in the same loop of a fori, or is there something else wrong?

We want to be able to attach different groups of files at these two parts of our code.

{% stripnewlines %}
|Date
|Quarter
|Staff Member
|Info for next quarter
|Attachment
|Date of update
|Staff Member
|Update note
|Attachment

{% newline %}
|—10%—
|—15%—
|—6%—
|—25%—
|—8%—
|—10%—
|—6%—
|—25%—
|—8%—

{% newline %}
{% fori quarters in custom.some %}
|{% input quarters.Date as:date %}
|{% input quarters.Quarter as:text %}
|{% input quarters.Name as:text placeholder:"" %}
|{% input quarters.Info as:text %}
|{% input quarters.thing as:file %}
|{% input quarters.DateOfUpdate as:date %}
|{% input quarters.Name2 as:text placeholder:"" %}
|{% input quarters.Updated_Info as:text %}
|{% input quarters.Thingy as:file %}

{% newline %}

{% endfori %}

{% endstripnewlines %}

Hi @ThomasB,

I’m afraid you’ve found a limitation within the fori related to attachments: we only allow one single attachment (file attribute) for each loop. This has been like this since the beginning, and I believe we already added this to our roadmap to investigate why (and if we could change that or not).

However, I guess your template wouldn’t work just as well, if you have one singe file attribute? Because you could add all attachments in there, no?

Hi Sven

That’s fine - thanks for the feedback!

Thanks for the understanding as well :relaxed: