Infopath calculate each row of a repeating table

This was somthing that bugged me for ages then it suddenly clicked and i couldnt belive how simple it is . As i didnt find anything on the net to help me work this out  i hope this will help someone.

The senario is;

I have a field in an infopath form which holds a value, then i have a repeating table in the same form which is from a SharePoint list. This repeating table has a number column which i want to calculate against the value field row by row.

My first mistake was to think that this is possible using a single text field, it is only possible to do this with a calculated value field as you cannot store data unbound in a repeating table.

Click on the right hand column in the repeating table and choose “Insert” > “Column to the right” give it a meaningful header then click in the new cell and insert a calculated value field.

Right click the calculated value field and click properties, click on the “FX” xpath button and then insert a field, choose the data source which the repeating table comes from, choose the field you wish to calculate on, then do the same to insert the in form field to calculate with and once both fields are in the box put the calculation symbol between the fields i.e. * / – + . Click ok to get back to the form and preview. Now all rows should have a row by row calculation against them.



Leave a Reply

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