If you're using Oracle, SQL Server [SINCE Orbeon Forms 2016.2], or DB2 [SINCE Orbeon Forms 4.7], or PostgreSQL [SINCE Orbeon Forms 4.8], when you deploy a form created in Form Builder, Orbeon Forms can create a form-specific view of your data, with one column for each form field.
You enable this feature by setting the relevant property listed below to
For instance, if using Oracle, you set:
When you enable this property, upon publishing a form, the persistence layer creates a view specific to that form. The name of the view is based on your app and form name, and has the form:
For instance, if your app is
hr and you form is
expense, then the view is named
orbeon_f_hr_expense. If upon publishing, there is already a view with that name, the persistence layer deletes it before recreating a new view.
The view always has the following metadata columns, with information copied from the equivalent columns in
[UP TO Orbeon Forms 4.3]
[SINCE Orbeon Forms 4.4]
Note that there is no
metadata_draft column, as drafts are not included the view. (Before 4.7 they were, incorrectly, see issue 1870.)
In addition to those columns, you have one column per form field, and each column is named by combining the section name with the control name. On some databases, like Oracle, columns names are limited to 30 characters, so the persistence layer truncates column names. It also converts dashes to underscores, removes any non alphanumeric character except inner underscores, and converts the name to uppercase (so it can be used in queries without quotes).
Orbeon Forms 4.5 introduces a new truncation algorithm so names are not cut short unnecessarily, and A numerical suffix is used instead for those columns which would introduce duplicates.
The section name is truncated to 14 characters, the control name to 15 characters, and both are combined with an underscore in between. In the vast majority of the cases, this will result in distinct and recognizable column names. In cases where two or more columns would end up having the same name or conflict with one of the metadata column, the persistence layer adds a number prefix of the form
003_… to each column to make it unique. If this happens, you might want to change your section and/or control names to have more recognizable column names.
Repeated grids and repeated sections are not supported, see issue 1069.
[SINCE Orbeon Forms 2016.1] Orbeon Forms handles fields inside nested sections and nested section templates. Such fields used to be ignored with Orbeon Forms 4.10 and earlier.