Skip to main content

Creating a custom rule in the Rule Designer

Build, test, and publish your own Data rule, step by step.

The Rules Designer lets you create custom checks tailored to your organization and run them alongside Pinnacle 21's built-in rules. This walkthrough takes you from a blank rule to one that's live in your validations.

🔑 Before you start: authoring rules requires membership in the Rule Designers group. See Managing Groups in P21E to set that up.

Step 1: Create the rule

On the Rules page, click + Create, choose a Rule Target (see Understanding Rule Targets in P21E for which to pick), and enter a Rule ID.

📝 Note: P21 adds the X- prefix for you, so you only type the rest: enter AE001 to create X-AE001. The full ID, including X-, can be up to 20 characters.

Step 2: Define the rule properties

Describe the rule in plain language: the Message a reviewer sees when it fires (keep it short and actionable), a fuller Description, the Publisher, and the Message Type, which is the severity: Error, Warning, or Notice. For a field-by-field walkthrough, see Understanding rule properties and assignments.

Step 3: Write the rule logic

Write your check in Pinnacle Query Language (PQL). See Writing Rules in P21 Rules Designer for the full syntax, functions, and more examples.

Step 4: Assign the rule

On the Assignments tab, control where the rule runs: the standard, class, and dataset (for example, SDTM, the AE dataset). Scope it tightly so it only fires where you intend. More detail in Understanding rule properties and assignments.

Step 5: Test the rule

Run the rule against a sample dataset right in the Designer and confirm it flags only the records you expect. See How to test Rules created with the Rules Designer.

Step 6: Publish the rule

Make the rule active from the Actions menu.

🚀 Don't forget: a rule that's only saved won't run in validations. You have to publish it. This is the most common reason a new rule doesn't fire.

Step 7: Manage versions

Every rule is versioned, so you can safely update or archive it over time without losing its history. See How versions work in the P21E Rules Designer.


Did this answer your question?