CASE: add multiple attachments

Before in Silverfin, you were able to add only one attachment with following code :

{% input custom.acc.annex as:file %}

Which gives this :
24

And you could only add one file :
54

:mega: Now it’s possible to add more than one file at once, or add more files after you added one :mega:

By using this tag:

{% input custom.acc.annex as:file_collection %}

So the file_collection let’s you add more files:
43

Hi Sven,

Nice feature.
Currently when I upload multiple files it shows two file names in one line.
That causes table with the fixed size stretch the cell that contains these 2 attachments. Can each file name began in a new row?
See layout for the table: |–10%–|--46%–|--15%–|--+

Thanks,
Ugis

Hello @Ugis,

The only way you can get that to work, is to make the first table not fixed (so if you define your table like this :

|––|--46%–|--15%–|--+

That way the first table will stretch so the data is visible
(or you can add the file/collection on a newline too; that might be an option too).

Let me know if this solves your issue

@sven

Can i change an existant as:file to as:file_collection?

I does not seem te work?

Before:

{% fori detail in current_account.details %}{% if forloop.first %}

|------------------------------|----------|--------------:+
| {% t "Saldo voorraad per" %} {% input detail.custom.date as:date %} | {% input detail.custom.file as:file %} |{% input detail.custom.value as:currency %}{% endif %}{% endfori %}

After:

{% fori detail in current_account.details %}{% if forloop.first %}

|------------------------------|----------|--------------:+
| {% t "Saldo voorraad per" %} {% input detail.custom.date as:date %} | {% input detail.custom.file as:file_collection %} |{% input detail.custom.value as:currency %}{% endif %}{% endfori %} 

I can’t see the already attached file en can’t even add files to it?

Gets this:

@Thijs what happens when you click on the paperclip?

Changing the as:file to as:file_collection shouldn’t erase the data stored as long as you don’t change the variable name.

Kind regards

@SamVanEenoo

Original Code:

|------------------------------|----------|--------------:+{% fori detail in current_account.details %}
| {% t "Saldo voorraad per" %} {% input detail.custom.date as:date %} | {% input detail.custom.file as:file %} |{% input detail.custom.value as:currency %}{% endfori %}

Input mode:

When i change it to file_collection:

Code:

|------------------------------|----------|--------------:+{% fori detail in current_account.details %}
| {% t "Saldo voorraad per" %} {% input detail.custom.date as:date %} | {% input detail.custom.file as:file_collection %} |{% input detail.custom.value as:currency %}{% endfori %}

Input mode:

When I click on the paperclip:

Hi Thijs

I justed tested it and got the same issue. Might be a bug. I’ll look further into this and will let your know when I have found a solution.

Kind regards

2 Likes

Any news?

Many thanks!

I’m afraid not @Thijs

The developers have been informed last week; I’ll remind them again. As soon as I have more info, I’ll let you know

PS seems this happens only in a fori-loop. If you change the code outside a fori-loop, this doens’t happen at all.

@Thijs,

Good news: this is back resolved! It was not yet supported for file_collection in account details. It is now

Thanks for letting us know!

1 Like

Hi @sven

I can confirm this works!

One more question:

I can’t use the file_collection in combination with size:mini ?

{% input detail.custom.verklaring as:file_collection size:mini %}

image

No you can’t @Thijs.

Maybe this can be an option though :