Overview
A conditional configuration dataset (CCD) is equivalent to a Data Control View in the legacy Construct. CCD’s view is created in SQL Server and define record-level control based on what is known about the data on a Grid or Properties Card container.
CCD contains conditional information that individually set the control status of each record in a column. For example, a CCD could be used to determine if a record can be edited or deleted, or if records are hidden based on the value of the record.
Configuring a CCD involves the following steps:
Create the CCD view in SQL Server.
Run a scan to import the view and create it as a Dataset.
Register the CCD in a WebApp’s Grid or Properties Card container.
Create the CCD View in SQL Server
CCD views are created in a SQL Server database. Use the following guidelines to create a CCD view:
Use the naming convention web*Ccd, where * contains the name of the table registered to the gird or properties card container.
The view should include all key and criteria columns used on the container to control.
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
Prefix the column containing the control status with "ccdCtl" when assigning a control status to a key column.
Run a Scan and Create CCD
Access the datastore in the Syniti Knowledge Platform (SKP) Catalog module associated with the database where the CCD view 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 CCD 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 Conditional Configuration Dataset list.
Click Save & Preview WebApp
to preview WebApp changes.Click Save WebApp
.
Note
The Update CCD button opens a dialog box that allows you to rescan the dataset and add any newly available fields from the underlying view to the CCD 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 CCD view must have a column that matches one or more of the table’s primary key columns.
Example
Below is an example of a view that creates a CCD in the SKP. The Customer table, which has a primary key of CustomerID, requires specific controls on the customer management page.
The
ApprovedandAlreadyinERPbit fields on each record are used to control whether the record can be edited or deleted.The
CustomerIDkey field remains editable as long as the record has not yet been added to the target ERP system.The
Address,ContactName, andContactTitlefields use special controls for certain account categories.Finally, the Approved button is disabled once a record has already been approved.
View DDL
SELECT CustomerID, --Primary Key field
CASE WHEN AlreadyInERP = 1 THEN 0 WHEN Approved = 1 THEN 0 ELSE 1 END AS ccdDelete, --Disables Delete for Records Already in ERP
CASE WHEN Approved = 1 THEN 0 ELSE 1 END AS ccdEdit, --Disables Edit for Records Approved
CASE WHEN AlreadyInERP = 1 THEN 0 ELSE 1 END AS ccdCtlCustomerID, --Cannot change Customer ID Key value
CASE WHEN AccountCat = 'SP' THEN 2 WHEN AccountCat = '02' THEN 0 ELSE 1 END AS Address, --Hides or Disables Address for special account category.
CASE WHEN AccountCat = 'SP' THEN 2 WHEN AccountCat = '02' THEN 0 ELSE 1 END AS ContactName,
CASE WHEN AccountCat = 'SP' THEN 2 WHEN AccountCat = '02' THEN 0 ELSE 1 END AS ContactTitle,
CASE WHEN Approved = 0 THEN 1 ELSE 0 END AS Approve --Disables Approval button for Records Approved
FROM dbo.CustomersRendered Grid Container
