You are viewing limited content. For full access, please sign in.

Question

Question

Collection - Using Fields for metadata on Upload fields

asked on March 23

I have a collection with a field that is calculated to include a row number and an Upload Field, and I want to Save the Upload Field to the Repository and use the calculated field as Metadata on the upload for the upload on the same collection row.

Example:
----------------------

Type                              Upload

  Document 1                  FileA.txt

                                          FileB.txt

----------------------

Type                              Upload

   Document 2                  FileC.png

----------------------

Type                              Upload

    Document 3                 FileD.pdf


FileA and B should be saved with Metadata field set to "Document 1"; FileC saved with "Document 2"; and FileD.pdf saved with "Document3"... 

Currently when I attempt to do this it seems to be using the ALL listed types and it fails if the metadata field isn't set to allow multiple values... 

Is there a way to do this with the Save to Repository Task in Forms ?

I found this article [ https://answers.laserfiche.com/questions/55773/Form-with-multiple-attachments#183171 ] which suggests that this can be done in a workflow, but the post was from over 10 years ago so I was hoping that there might be a better means to do this now.

 

0 0

Answer

SELECTED ANSWER
replied on March 23 • Show version history

There is a ROW() function you can use for field values in the Save to Repository task when the file comes from a table/collection variable; this will use the corresponding value.

{/dataset/Collection/Variable[ROW()]}

The brackets are used to get the value from a specific numbered row, and the ROW() function provides a dynamic reference to the "current" row number.

It doesn't really jump out in the documentation, so it tends to get missed.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.