Add a button to a repeating table to copy row data

Hi everyone!

I will show you how to add a button to a repeating table and be able to copy information from that row to other fields.

Create a list in SharePoint and name it Location with three columns, Title, Region and City.

Add a data connection to your form to receive information from this list in SharePoint. Now when you have your repeating table as a secondary source, highlight it and drag it to your form.

Put your cursor somewhere in the column for ID, right click and choose DeleteColumns, now you only have the Title, Region and City columns left.

Now put the cursor somewhere in the City column, right click and choose Insert – Columns to the right.

It should now look like this

Now add a button in the field next to the City field.

Add three Text Box fields somewhere in your form and name them MyTitle, MyRegion and MyCity.

Highlight the button and click Manage Rules in the ribbon. Create a new Action rule to set a field’s value. It should look like this.

The Value is built by adding the function current(), then a slash “/” and lastly, add the field Title from your secondary source Location.

Repeat this step twice so that you get a value for each of your three fields. You should now have three actions in your rule, like this.

That’s it, this is how it could look.




3 Comments on “Add a button to a repeating table to copy row data”

  1. Neeraj yadav says:

    Wow great post … thanks a lot Niax your solution just solve my problem great 🙂

    • SPNiax says:

      Glad to be of help!
      Happy InfoPathing 🙂


      • Neeraj yadav says:

        Hi SPNiax ,
        i have a small question actully i am fetching the data from sharepoint list inside the repeating table in infopath form . The problem is that i want to show these fields in the sharepoint liberary where i have published my form but now its a secondary data source so these field are not avalible to add column at the time of publishing. somebody suggested my to copy all repeating table data in textbox and hide it but the formula is very complex and not working for me . Can you help me . Its urgent

Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s