Note: Running custom rules in a validation requires P21E 6.5.0 or later, and Data Exchange (DX) must be enabled. This article assumes you have already created and tested a rule. If not, start with Creating a Custom Rule in the Rule Designer.
Custom Data rules behave the same in Data Exchange as they do for CDISC data, with one exception: where the rule finds the dataset definitions it scopes itself to. Get that wrong and the rule is quietly left out of the validation. This article covers only what is specific to Data Exchange.
❓ Why Data Exchange is different
When you assign a rule, you are pointing it at dataset definitions, the metadata that says a dataset exists and what it should contain. The rule then runs against the actual datasets you upload.
For CDISC validation, the Standard your Data Package uses already contains dataset definitions, so a rule assigned to that Standard has something to scope to straight away.
The Data Exchange Standard (OTHER 1.0) is different: it contains no dataset definitions at all. So in Data Exchange, your definitions come from one of two places, and that is what decides how you assign the rule:
A Study Spec you author for the Data Package.
A custom Standard you build for Data Exchange, with no Study Spec on the Data Package.
🎯 Path A: your definitions are in a Study Spec
Use this when you have authored a Study Spec and the Data Package is configured to the empty Data Exchange Standard (OTHER 1.0)
On the rule's Assignments tab, set Standard to the Data Package's Standard, so OTHER 1.0.
Type in Dataset name as it appears on the Datasets tab of your Study Spec (i.e. LB_CENTRAL)
Publish the rule, and publish the Study Spec if you validate against the published version.
Even though OTHER 1.0 defines no datasets, typing in a dataset here is correct. P21E matches the rule to the Data Package by the Standard, then reads the definitions from your Study Spec.
Every Data Package whose study spec has the Dataset specified will pick up the rule.
🎯 Path B: your definitions are in a custom Standard
Use this when you have built a custom Data Exchange Standard that holds the definitions, and the Data Package has no Study Spec. Take this path if you want one rule to apply to every Data Package using that Custom Standard.
On the Assignments tab, set Standard to your custom Standard, by its exact name and version.
Optionally set Dataset to narrow the rule. These refer to the definitions in your custom Standard.
Publish the rule.
Every Data Package configured to that Standard picks the rule up, with no per-package setup.
