Update to

Application Development

Data Control Views

Data Control Views are created in SQL Server and define control based on what is known about the data on the page. Unlike a PCV, which defines the same control for every record in a column, a DCV contains instructions that individually set the control status of each record in a column. For example, a DCV could be used to determine if a record can be edited or deleted, or if buttons are disabled based on the state of the record.

Refer to Control Views for general information.

Setting up a DCV involves the following steps:

  1. Create the Data Control View.
  2. Register the Data Control View.

Create the Data Control View

DCVs are created in SQL Server. Use the following guidelines, which assume basic knowledge of the Stewardship Tier methodology and SQL Server, to create a DCV:

  • Use the naming convention web*Dcv, where * contains the name of the table registered to the page.
  • Include all key and criteria columns on the page to control.
  • Include all column names for the technical names of the columns on the page that contain the control status values (0 = Disable, 1 = Enable, 2 = Hide).
  • Prefix the column containing the control status with “boaCtl” when assigning a control status to a key column.

Register the Data Control View

To register the DCV to a page in the Stewardship Tier:

  1. Select Admin > WebApps in the Navigation pane.
  2. Click the Pages icon for the desired WEB APP NAME.
  3. Click Vertical View for the page DESCRIPTION.
  4. Click Control Views tab.
  5. Click Edit.
  6. Select the SQL view from the Data Control View list box.
  7. Click Save.

Example of a Data Control View

In the following example, a DCV is used to disable the Product History and Order ID icons on the Customers page when the count on the linked pages is zero.

SQL View

NOTE: In order to control a KEY column, preface the name of the KEY column that is being controlled with “boactl.” For example,

SELECT CustomerID, 1 as boaCtlCustomerID

FROM Customer

In the above SQL, the CustomerID column is the Primary Key of the table and the values in the boaCtlCustomerID column are used by the Stewardship Tier framework to control the display and editaibilty of the field on the WebApp page.

Stewardship Tier Page