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

Question

Question

add row automatically on duplicate table

asked on December 5, 2024

I need to insert a table at the beginning of a form for information and again at the end of the form for confirmation everything was completed. I have managed to duplicate the table, including the values. However, I am unable to make it add a row to match the original table. 

I have looked at various posts on Answers, but I am not an overly experienced coder, so I can't seem to customize it well enough to make it work.

At present, my table only has one column, but there will be more once complete. It looks like this.

 

0 0

Replies

replied on December 5, 2024

Which form designer are you using? I cannot tell from the screen shot

0 0
replied on December 6, 2024

New Forms Designer

0 0
replied on December 16, 2024

Hi Mary,

Is the table already populated when the form loads, or are you trying to replicate rows added by the user while filling out the form?

Updating to match a pre-filled table should be possible using the addRow functionality, but I don't know if there is a way to detect when a user adds new rows manually.

0 0
replied on December 17, 2024

it would be prefilled.

0 0
replied on December 17, 2024

If this table is filled beforehand, then it might be easier to fill the second table via workflow. I've done that often using For Each Row to iterate the table, store each column in a multivalue token, then set the second table equal to those tokens.

If you want to do it with JavaScript, then you could try getFieldValues on one of the table columns and then use the length of that value array to determine how many rows are needed, then use the addRow function in a loop.

0 0
replied on December 20, 2024

In my case the table is passed from form to form, so I was able to get it working because the original table was on the first form. On the second form is where I needed it at both end of the form. Since it was already prefilled, I was able to normal settings. I couldn't see it when I previewed the forms, but it worked in process.

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

Sign in to reply to this post.