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

Question

Question

How do I only store the first value from a table in my metadata fields during archiving?

asked on May 11, 2022

I have a table in my form so that you users can add multiple accounts on a form if needed.

When I go to archive the form, I only want the first account number to populate on my AcctNo metadata field, but I'm not sure how to accomplish this or if it is even possible. 

This is how I have the variable setup to save.

But if there are multiple accounts on the table (shown below), it fills the AcctNo field like this: 1234; 2345; 3456

In this scenario, we only want the 1234 to show in the metadata field. Does anyone know if this is possible? If so, how would I do it?

 

Thanks!

 

0 0

Answer

SELECTED ANSWER
replied on May 11, 2022

Hi Jessica,

The ROW() index is used for archiving file uploads in same table, which seems not your use case.  

{/dataset/Account_Number/Account_Number[1]} should be enough to work for  archiving the form.

1 0

Replies

replied on May 11, 2022

Starting with Laserfiche Forms 10.2 you can retrieve variables from a specific row. For details see this page in the online help files, specifically the Note field.

1 0
replied on May 11, 2022

Hmm. I tried it 3 different ways. One didn't change it, as it still saved all of the account number values to the metadata field, and the second two just suspend the archive step.

{/dataset/Account_Number/Account_Number[Row()]}

{/dataset/Account_Number/Account_Number[Row(1)]}

{/dataset/Account_Number/Account_Number[Account(1)]}

0 0
SELECTED ANSWER
replied on May 11, 2022

Hi Jessica,

The ROW() index is used for archiving file uploads in same table, which seems not your use case.  

{/dataset/Account_Number/Account_Number[1]} should be enough to work for  archiving the form.

1 0
replied on May 12, 2022

Thanks Ziyan! That is exactly what I needed! 

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

Sign in to reply to this post.