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

Discussion

Discussion

Automatically Assign Numbers to Attachments in Forms

posted on March 17, 2020

I have a form that allows user to upload attachments.  I have built a table for this use and have a column called Number. This has a default value of 01.  I'd like to have this Number field updated sequentially as the user uploads additional documents. What's the easiest way to accomplish this?

0 0
replied on March 17, 2020

You can set up the number column to have a formula =row()

This will count up as you add new rows. Then for your file upload field, only allow 1 upload. That way the user can only upload 1 file per row and it's counted with the number of rows.

1 0
replied on March 17, 2020

Thanks, Jared.  That works.  Is there a way to force two digits so they will sort properly when stored to the repository?

0 0
replied on March 17, 2020

You could use a regular expression, but the users would have to still type 01, 02 to meet the conditions. There are also ways to use JS to have this done automatically behind the scenes. 

0 0
replied on March 17, 2020 Show version history

Thanks, Jared.  I'll try the JS route.

In case anyone is reading this and needs to also ensure each attachment that is uploaded from a table should been named by variables from the table.  The syntax is {/dataset/Table/Column_1[Row()]}

 

Reference the great Alan Chan's post: - https://answers.laserfiche.com/questions/88482/In-Forms-10-are-you-able-to-relate-field-values-to-a-file-upload-in-a-given-row#161641

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.