You are viewing limited content. For full access, please sign in.

Question

Question

Forms - display values from a previously submitted form

asked on February 12, 2016 Show version history

I know Forms stores submitted field values in the database.  Is there a way to populate a new form with field values from a previously submitted form, possibly by form ID?

0 0

Answer

SELECTED ANSWER
replied on February 15, 2016

Eric - You will have to do some under-the-hood work but here is what I found in just a few minutes looking at the Forms tables;

It looks like the submissions might be in the [dbo].[cf_submissions] table and queryable by [unique_id]? 

The field values might be in the [dbo].[cf_bp_data] table that can be keyed to the [dbo].[cf_submissions]table on [submission_id]?

The field definitions might be in the [dbo].[cf_fields] table keyed to the [dbo].[cf_bp_data] table on [attribute_id]?

Other than looking at the raw data in the SQL Management Studio I did not do any joined queries to verify the table data or relationships.

 

To echo Ege's comments my feedback would be to create your own tables and use Workflow to write and query the data.  If you use your own tables you have complete control over what data is stored and where.  If you do figure out the native Forms data structures there is no guarantee that the structures won't change as new Forms versions are released...

2 0

Replies

replied on February 14, 2016

Do you mean from a form that's not part of the same business process? That's not possible out of the box. We generally do it by storing that data in a custom table (using Workflow) and then configuring the other forms to perform lookups on that table. If you provide a use case I can go into a bit more detail.

0 0
replied on February 15, 2016

I was trying to get away from having to store the data in a new SQL table.  The data is stored somewhere in the actual Forms database, so I think it might be cleaner to pull from that instead of duplicating data.  

Does one Form's SQL table store all the data in a submitted form, or is it spread out across multiple tables?  And does anyone know the name of the table I can add as a lookup to pull that info (i.e. dbo.cf_submissions_archive?)

0 0
SELECTED ANSWER
replied on February 15, 2016

Eric - You will have to do some under-the-hood work but here is what I found in just a few minutes looking at the Forms tables;

It looks like the submissions might be in the [dbo].[cf_submissions] table and queryable by [unique_id]? 

The field values might be in the [dbo].[cf_bp_data] table that can be keyed to the [dbo].[cf_submissions]table on [submission_id]?

The field definitions might be in the [dbo].[cf_fields] table keyed to the [dbo].[cf_bp_data] table on [attribute_id]?

Other than looking at the raw data in the SQL Management Studio I did not do any joined queries to verify the table data or relationships.

 

To echo Ege's comments my feedback would be to create your own tables and use Workflow to write and query the data.  If you use your own tables you have complete control over what data is stored and where.  If you do figure out the native Forms data structures there is no guarantee that the structures won't change as new Forms versions are released...

2 0
replied on February 15, 2016

Exactly Cliff. Duplicating data is not ideal, but having full control is a good thing, especially since you can structure the tables in a way that makes it easy for Forms to look up stuff. And you're absolutely right about the possibility of Forms database structure changing at some point, especially with BPM Server coming later this year...

0 0
replied on February 16, 2016

Good input - I'll go with a new table to store the data.  Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.