Overview
A Page Control View (PCV) can change the control of any column on a grid or form container. While this capability can also be achieved with a Conditional Configuration Dataset (CCD), a PCV contains a single instruction to set the control status of a particular column where the status is set for every row of data on a container. In contrast, a CCD contains an instruction to set the control status of a particular column for every row on the container containing specific data.
Create the PCV in SQL Server
PCVs are created in a SQL Server database. Use the following guidelines to create a PCV:
The view should include all key and criteria columns used on the container to control.
Use a PCV when the control status determinations are to be made based on what is known of the container as a whole (for example, binding criteria, shared criteria). Enter the affected column in the Alias.
Include all column names for the technical names of the columns on the container that contain the control status values.
0 = Disable
1 = Enable
2 = Hide
Use the reserved words (ccdEdit, ccdDelete, ccdAdd) to control CRUD permissions.
Prefix the column containing the control status with "ccdCtl" when assigning a control status to a key column.
Run a Scan and Create PCV
Access the datastore in the Syniti Knowledge Platform (SKP) Catalog module associated with the database where the PCV was created.
Scan the datastore to ingest metadata into the SKP.
Create a dataset using the same view name.
Set the Affected Table field.
Register PCV in a Container
On the Construct Preview’s home page, edit the required WebApp. The WebApp configuration page is displayed.
Access Pages > Your Page > Grid or Properties Card in the Tree Navigation panel. The Details panel is updated with the Grid or Properties Card fields.
Access the Data section and select the newly created dataset from the Page Control View Dataset list.
Click Save & Preview WebApp
to preview WebApp changes.Click Save WebApp
.
Note
The Update PCV button opens a dialog box that allows you to rescan the dataset and add any newly available fields from the underlying view to the PCV dataset used in this container.
Specify the dataset classification.
If the scan errors out, access the associated Datastore’s scan logs in the SKP Catalog module to troubleshoot the error.
Be sure the primary dataset for the Container has the Affected Table configured and that table has a primary key. The PCV must have a column that matches one or more of the table’s primary key columns.
Examples
Example A
Below is an example of a view that creates a PCV in the SKP. The Customers table requires specific controls on the key columns, such as ContactTitle, Fax, Region, and CompanyName. Additionally, this view denies access to add new rows and disables the PCV toolbar button.
View DDL
CREATE VIEW [dbo].[pcv_customers] AS
SELECT
'2' AS ccdCtlContactTitle, -- Hides ContactTitle
'0' AS ccdCtlFax, -- Disables Fax (read-only)
'0' AS ccdCtlRegion, -- Disables Region (read-only)
'1' AS ccdCtlCompanyName, -- CompanyName stays enabled (editable)
'1' AS ccdDelete, -- Allows Delete operation
'0' AS ccdAdd, -- Denies adding new rows
'0' AS [ccdCtlPCV] -- Disables the PCV toolbar button
GORendered Container

Example B
Below is an example of a view with Drill Down Only enabled on the Order Details container, where PCV is used. The parent container, Orders, includes a page binding criterion in the Details button column.
If the shipped date is present on the Orders page, you cannot edit, remove, or add any records on the Order Details page. If the shipped date is not present, data can be modified.
This view displays values based on the shipped date from the Order ID. Navigating to Order Details via the Details button applies the correct PCV control statuses. With Drill Down Only enabled, accessing Order Details directly from the left menu does not apply PCV, as there is no drill down context.
View DDL
CREATE VIEW [dbo].[pcv_order_details] AS
SELECT
o.OrderID,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdCtlProductID,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdCtlUnitPrice,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdCtlQuantity,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdCtlDiscount,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdDelete,
IIF(o.ShippedDate IS NOT NULL AND o.ShippedDate < GETDATE(), '0', '1') AS ccdAdd
FROM dbo.Orders oRendered Container