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

Question

Question

Duplicating tables in a form

asked on May 3, 2022

I'm attempting to create a timesheet for process for payroll. Staff will fill out the table for the 2 week period and then a new form with this table will be available for Finance to review. For auditing purposes, I want the table that was filled an approved my staff that is read only, and then I'm hoping to have an additional table that is a duplicate of the table filled out by staff but is editable by Finance. I'm able to duplicate the tables easily enough, but I don't know how to retain the data in the table so they're the same (at least until it's edited).

Is there someway to do this? The tables are 14 rows long to collect data in a two week period with up to 7 different columns representing various time block types (vacation, sick, overtime, etc.)

0 0

Replies

replied on May 3, 2022

Hello,

If you have multiple Forms (the initial Form submission and then the approval Form that goes to the Finance team), you could simply just drag the existing table's variable onto the second approval Form.

If you reference my screenshot, my form called Test is the starting form with the table the staff fills out. Then Test 2 is what is sent to Finance for approval. If you go to the second Form (Test 2 in my case), and click the Variables tab, drag and drop your table Variable onto the Form.

Then in your User Task for the Finance teams approval, just select the second Form that includes the table variable. This will automatically bring over the variables from the first Form into the second so all values are retained. Then you could simply save both Forms to the repo as a single document to have both old and new data within the table.

1 0
replied on May 3, 2022 Show version history

The easiest way to do this is probably with a workflow that is run right after submission (set it to wait until the workflow completes before proceeding to the next step/task).

In the workflow:

  1. Check the box for Started by LF Forms in the Workflow Properties
  2. Create a separate multivalue token for each column
  3. Retrieve the table variable using Retrieve Business Process Variables
  4. Use a For Each Row activity to loop through the table variable rows
  5. Append each column value to its associated token
  6. After the loop, use Set Business Process Variables
    1. Get the variables for the individual columns of the 2nd table
    2. Set the columns equal to their associated Tokens

 

It is important that you use multivalue tokens and add the Set Business Process Variables after the loop because if you try to set form variables more than once it will only keep the last ones. 

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

Sign in to reply to this post.