Saving forms to database

Avatar

Avatar

jetate

Avatar

jetate

jetate

01-05-2019

I currently have some forms set up that are saving to MySQL with the Drafts and Submissions process successfully. For our currently purposes, we are needing to keep these forms available as drafts for users to continually update relating to the progress of varying projects.

However, we are also trying to do some reporting based on the data in these form drafts. Is there a way to simultaneously store the forms data to a separate table in the database that we can run reports from? Or is there another way to store and still be able to modify the data from a different table rather than using the drafts option?

We previously had some database limitations in-house where we were not able to create our own tables, but that was recently resolved. If necessary, we can potentially change how we're currently managing the forms data with the drafts and submissions if we are able to put and pull the data from the database properly, however with close to 2000 active forms, it might be difficult to migrate them all quickly.

Links to tutorials would be helpful as I'm not a master with AEM or Java.

AEM 6.3.3.3

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

jetate

Avatar

jetate

jetate

02-05-2019

Thanks, everyone, for the replies. I figured out how to achieve what we're looking for with the drafts and submissions data in order to create some reporting on our drafts information by parsing the XML in the data field of the data table. That maintains my drafts and still gives me access to my data.

Saving straight from the form was  never my main issue, just trying to maintain my current solution while providing access to reporting.

Answers (9)

Answers (9)

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

06-05-2019

You can create a view as well on top of tables for reporting purposes to avoid any performance issues on the actual tables.

Avatar

Avatar

antoniom5495929

Avatar

antoniom5495929

antoniom5495929

01-05-2019

Hi AEMFORMSForum,

Just for my knowledge, is it necessary an additional license to use this Adaptive forms?

Thanks,

Antonio

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

06-05-2019

Hi Antonio,

Yes, you need a separate license for AEM forms.

Avatar

Avatar

workflowuser

Employee

Avatar

workflowuser

Employee

workflowuser
Employee

02-05-2019

If you use json schema to base your Adaptive Forms

then searching for submitted data becomes even more easier with the json query

Avatar

Avatar

workflowuser

Employee

Avatar

workflowuser

Employee

workflowuser
Employee

02-05-2019

Yes

you need AEM Forms License

Avatar

Avatar

workflowuser

Employee

Avatar

workflowuser

Employee

workflowuser
Employee

01-05-2019

have you looked at the Form Data Model approach to saving and fetching data from DB in Adaptive Forms

Create Form Data Model Tutorial

Avatar

Avatar

antoniom5495929

Avatar

antoniom5495929

antoniom5495929

01-05-2019

Hi,

You can find in [0] an Adobe official docs which explain how to use the database connection with example of java stuff.

In my experience I started from this in order to achieve our goal.

[0] https://helpx.adobe.com/experience-manager/using/datasourcepool.html

Let us know.

Thanks,

Antonio

Avatar

Avatar

jetate

Avatar

jetate

jetate

01-05-2019

How would you pull it back out for updating later? Or would it be possible to submit to the database alongside the drafts submission but with just the form data?

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

01-05-2019

You could easily create a custom form action that sends submitted data to an OSGi service. Then you can write Java Database logic to persist the data into a relational database.