Re: Update table values using a form connection

Home Forum Working with Tables Update table values using a form connection Re: Update table values using a form connection

#4872

ajobling
Keymaster

This is possible but a little complicated.

Use a Form Connection to import all the rows from multiple form instances and make sure that you also import the forms instance ID’s so you know where each row came from.

In your ‘master’ form you will have all instances in a single table; the data can be modified (except for the instance ID would is better if it is hidden).

The complication arises because you cannot pass all the data back in a single action otherwise everything will go back to a single form instance.

You will need to build a ‘looping’ behavior which does the following:

1) Using the instance ID, copy all the rows from a single instance into another table object on the same form (can be hidden)

2) Use a Form Update Connection to send all this data back to the instance it came from

3) Delete the data in the hidden table

4) Using the instance ID, copy all the rows from the next instance into the hidden table

5) Send all this data back to the instance it came from

And so on until all the data has been returned.

Note: The data that you send back to the original form instance will overwrite the data that was already there, so if you send 5 rows of data to the master form, then delete a row in the master form and send it back, then you will only get 4 rows showing in the original form instance.

Note also: There is a known issue which means no data will be returned from the master form if there is only a single row sent via the Forms Update Connection.