Application Development
Defaults Views
A Defaults View is used to dynamically insert a value based on other criteria. A Defaults View is often seen in the following scenarios:
- In a Horizontal switch to Vertical page where a value is defaulted into a field on the Vertical View based on a selection made on the Horizontal View
- In a parent-child page where a value is defaulted into a field on the child page based on an entry on the parent page
NOTE: A column property can be added to a page to insert a default value into a field when a new record is added. Refer to Set Default Field Value for a Column for more information.
Refer to Control Views for general information.
Setting up Defaults Views involves the following steps:
Create the Defaults View
Defaults Views are created in SQL Server. Use the following guidelines, which assume basic knowledge of the Stewardship Tier methodology and SQL Server, to create a Defaults View:
- Use the naming convention web*Def, where * contains the table name of the page, minus any prefix.
- Enter the value that is used as the default in the column value on the view.
- Enter the name of the column (on the Horizontal or Vertical View) that will be updated as the column alias. Make sure that the alias (the column name on the Horizontal or Vertical View) matches the column name exactly.
- Include all key and criteria columns on the page to control.
Register the Defaults View
To register the Defaults View to a page:
- Select Admin > WebApps in the Navigation pane.
- Click the Pages icon for the desired WEB APP NAME.
- Click Vertical View for the page DESCRIPTION.
- Click Control Views tab.
- Click Edit.
- Select the SQL view from the Defaults View list box.
- Click Save.
Example of a Defaults View
In this example, the Time Zone field on the Vertical View is populated based on the State value from the Horizontal View. The value is defaulted into the Time Zone field; however, it can be overridden.
SQL View
Stewardship Tier Page