Section | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Submission Data
Note |
---|
The submissions repository can store your form data in three ways -- as data values; as an [[#XML_Document | xml document]]; as a [[#Viewing_Attachments_.26_PDF_Image | pdf form image]]. By default for efficiency, data is only stored as xml. If you plan to [[#Viewing_Submissions_in_Excel | export your form data to an Excel spreadsheet]] or plan to view your form data in the [[#Submissions_Detail | submission detail view]] you must configure your form to save the data field values. See the documentation for [[V4_Designing_Forms#Setup_Key.2FSaved_Fields | setting up key/saved fields]]. |
...
The form is shown filled in above. We've filled in all the fields and added a second repeating incident. When the form is submitted, frevvo generates an XML document that looks like the one below:
Code Block | |
---|---|
html/xml | <ns:form xmlns:ns="http://www.frevvo.com/schemas/_5PqoILXnEeCqU4w2X0ufGw" name="FNLN2"> <Personal> <FN>John</FN> <LN>Doe</LN> <EmailAddress>johndoe@yahoo.com</EmailAddress> <Phone>202.202.2020</Phone> </Personal> <Incident> <Date>2010-08-01</Date> <Description>Parking ticket</Description> </Incident> <Incident> <Date>2010-08-08</Date> <Description>Speeding ticket</Description> </Incident> </ns:form> |
...
If the structure of the form is changed, the generated XML document (and associated schema will change). For example, if you add a new Section - say it's called Info - and nest both the existing Personal Section and the Incident Repeat inside this new Section, the XML document will change to reflect this change as shown below (snipped for brevity):
Code Block | language | html/xml
---|
<ns:form xmlns:ns="http://www.frevvo.com/schemas/_5PqoILXnEeCqU4w2X0ufGw" name="FNLN2"> <Info> <Personal> <FN>John</FN> ... </Personal> ... </Info> </ns:form> |
...
To retrieve the count of ALL submission for a specific form:
Code Block | language | sql
---|
select count(*) from formsubmission fs, formsubmissiontype fst where formsubmissiontype_formtype_id=fst.id and fst.ownerid='JoeSmith' and fst.deleted is null and fs.state='SUBMITTED' and fst.applicationname='Economic Impact' and fst.name='pledge2009' |
To retrieve the count of ALL submission for forms in a specific application:
Code Block | ||
---|---|---|
| ||
select count(*) from formsubmission fs, formsubmissiontype fst where formsubmissiontype_formtype_id=fst.id and fst.ownerid='JoeSmith' and fst.deleted is null and fs.state='SUBMITTED' and fst.applicationname='Economic Impact'; |
To retrieve the count of ALL submission for a given form designer:
Code Block | language | sql
---|
select count(*) from formsubmission fs, formsubmissiontype fst where formsubmissiontype_formtype_id=fst.id and fst.ownerid='JoeSmith' and fst.deleted is null and fs.state='SUBMITTED'; |
...