Expand my Community achievements bar.

Solution Needed for prefilling the form from database

Avatar

Former Community Member

Hi

I have developed a process in which all the data from the forms get saved in the database at the end of the process.I am using Oracle10g database .Now i want to update my form as well as the database.I am filling the form from the workspace itself.Ise there any option to prefill the from using existing data from the database and update my data in the form as well as in the database.I want to prefill the existing data into my form from the database.

6 Replies

Avatar

Former Community Member

Create a process which starts in Workspace and add an Action Profile to get the data from the database. An Action Profile is simply a sub-process that replaces the default render operation. The attached process includes an Action Profile called 'GetFormData' which uses the JDBC service to read a single row from a MySQL database. The data from the database is mapped to the process variable 'formData' which includes the schema reference to the form schema and the data is merged with the form and rendered in Workspace. To create an Action Profile click the icon with the bluish outline.

Untitled.png

You won't be able to execute the imported process but it will provide guidance for creating a similar process.

Steve

Avatar

Former Community Member

I am confused with that process which steve had send to me.I want to know how that SimpleFormPrepareDataProcess works in the workspace.My problem is that,i have got already lot of data in the database with unique ID.In my new process i have got a new form in the workspace with all the fields present in the previous form.Now by selecting that particular Unique ID ,i want to fetch all the data of that ID from the database and should display in the form fileds so that i can make changes in that form as well as in the database.


Avatar

Former Community Member

SimpleFormPrepareDataProcess is an example of a custom rendering sub-process that accesses data from a database to pre-populate a form in Workspace. You will extract a record from Oracle by ID and map the record into the form data. The form will be rendered in Workspace for submission. Upon submission the updated data will be extracted from the form data and a second JDBC service operation will update the database by ID.

Steve

Avatar

Former Community Member

But my requirement  is that when i enter a particular record id dynamically ,all the other fields which is related to that id should be filled .ie.I want to fill only the reord id field in the form,rest of the form fileds should be filled auotomatically by fetching the data from the database.Is it possible to do this with the same process which you had sent me?

Avatar

Level 1

I happened to see that you have been able to sucessfully save the data into the oracle database from workspace. I am actually stuck in doing the exact same thing. Can you please tell me how you were able to pass xml string from workspace and store it into the database. I am using soap wsdl to extract some data from the workspace process