Expand my Community achievements bar.

How to update database with addInstance Data

Avatar

Level 1

Dears,

I am using dynamic pdf form in Process Management ES where i am using webservices to retrieve or insert data in database

in pdf form i am using addInstance() to increase the subform instance

here i want to insert the data from the added Instance of the subform into database

Please help me in this issue

Thanks in advance

Regards,

Chandra Sekhar

5 Replies

Avatar

Former Community Member

When you get the data back into the process you will get all of the data (not just a part of it). If you only want to add the new rows then you will have

to do some tricky xpath manipulation to extract only the parts you want. You will also have to know how many rows are already in the database so you know what to extract. Can you not simply replace everything each time the data is submitted?

Paul

Avatar

Level 1

Thanks for the reply

what i am tring is to insert data from form to database

Regards,

chandra sekhar

Avatar

Former Community Member

Are you storing the data as a complete transaction or taking it apart and storing the data field by field?

Paul

Avatar

Employee

As Paul mentions, you will have to use xPath statements to pull the information you want from the form data and build your SQL statement.

I am attaching a simple process that uses the JDBC component to show how this can be done. It does not use a web servcie, but I hope that it will help you.

Avatar

Level 1

Dear Paul,

i want to update all data at a time