...
Tip |
---|
The word "schema" is a reserved word for query names. If you have a query in your configuration.xml with a name that includes the word "schema" will show an error. |
Document URI Properties
Excerpt | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
After you have generated controls from the elements in your database schema, set your form’s Document URI to the database connector query URL. Follow these steps:
The first section in the wizard is for the form's default document. This is indicated by the Document Name of "default" displayed in the wizard. The default document maps to all of the controls you added to this form by dragging and dropping from the palette. This is typically not the document you want to configure.
The next screen has two sections: Read URI and Write URI. Typically, when the form loads, customers read form data from their database to initialize the form and send the updated XML document to the same database upon form submission. Enter the same URI in the Read URI and the Write URI fields, as shown in the image, with the appropriate SQL statement to run if you are reading from and writing to the same database using the database connector. It is possible to read the form initialization data from one database and then update a different database. Enter different URIs in the Read URI and the Write URI fields if this is your situation.
You also must specify which of the four SQL statements to run—you do this by choosing the appropriate values in the Document URI Read Method and Document URI Write Method dropdowns according to the table below. (You may notice in the Forms Designer that the Document URI Read Method drop down box includes a POST option, but it is not shown below because it is not used by the database connector.)
You’ll see one set of Document URI properties for each schema in your form. Type the Document URI next to the schema name—make sure not to type it next to the Default schema. To specify which of the four SQL statements to run, choose the appropriate values in the Read Method and Write Method dropdowns, based on the information below.
Note that you may choose only one Write Method in the Forms Designer. |
Still using the customers example, assume the Document URI for the schema customers is:
...
Individual controls also may trigger SQL statements, if you’ve customized your form with rules. See Database Connector REST Service for an example of using the ResultSet returned from the Database Connector to dynamically populate the options in a dropdown control.
Show/Hide Required Fields
...
Adding Message or ComboBox Controls from Schema
In order to add a Message or ComboBox control, you will need to edit your schema and add the appinfo attribute. Define the attribute in your schema like this:
Code Block |
---|
xmlns:frevvo="http://www.frevvo.com/appinfo" |
Then edit the element and display type as follows.
Combobox
Code Block |
---|
<xsd:element default="ComboBox" minOccurs="0" name="Department" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>ComboBox</frevvo:displaytype>
<frevvo:label>Department</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element> |
Message Control
Code Block |
---|
<xsd:element default="Message" minOccurs="0" name="MessageControl" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<frevvo:displaytype>Message</frevvo:displaytype>
<frevvo:label>Message Control</frevvo:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element> |
Show/Hide Required Fields
There are times when you have several fields that you want hidden and then only want to make visible depending on the value entered into another field. Thus only when the fields are visible do you want them to be required. Currently hidden required fields are still required and will prevent form submission. Automatically making hidden fields not-required may be added in a future release of .
See the documentation for Data Sources and Schemas for a solution to implement show/hide with required controls.