Field Visibility with Business Rules
Business rules are the fastest way to control field visibility and editability on model-driven forms without writing code. Here's how to set them up and avoid the common traps.
You have a model-driven form and you want a field to appear only when another field has a specific value. Or you want to disable a field after a status changes. Business rules are the no-code answer for this, and they work well — as long as you understand a few things about how they actually behave.
Creating a Business Rule: Step by Step
- Open your solution in make.powerapps.com.
- Navigate to the table you want to add the rule to.
- Click Business rules in the left navigation (under “Customizations” or the table’s detail view).
- Click New business rule.
- The visual editor opens with a Condition tile already on the canvas.
Setting the Condition
Click the Condition tile. On the right panel:
- Field: Pick the field that drives the logic (e.g.,
Payment Method) - Operator: Choose
Equals,Contains,Does not equal, etc. - Value: The specific value to check (e.g.,
Credit Card)
Adding the Action
From the toolbar, drag an action tile onto the canvas — either on the true side (condition met) or false side (condition not met). The actions you’ll use most:
- Show field / Hide field — Controls visibility
- Set field value — Populates a field automatically
- Set business required / Set not business required — Makes a field mandatory or optional
- Lock field / Unlock field — Makes a field read-only or editable
Connect the action tile to the appropriate side of the condition with the connector arrows.
Example: Show “Card Number” Only When Payment Method Is Credit Card
- Condition:
Payment MethodEqualsCredit Card - True side: Show field →
Card Number - False side: Hide field →
Card Number
That’s it. Save and activate the rule.
Scope: Entity vs All Forms vs Specific Form
At the top-right of the business rule editor, there’s a Scope dropdown. This matters more than people realize.
- Entity: The rule runs server-side. It executes on create/update regardless of which form is used, including when records are updated via API or flows. But Show/Hide and Lock/Unlock actions don’t work at Entity scope — they only work on forms.
- All Forms: Runs client-side on every form for this table. Show/Hide and Lock/Unlock work here.
- Specific Form (e.g., “Information”): Runs only on that one form.
If your show/hide rule isn’t working, check the scope first. This is the most common reason.
Multiple Conditions
You can add multiple conditions in a business rule. Each condition can have its own true/false actions. Connect them in sequence on the canvas — they evaluate left to right.
To check multiple fields together (AND logic), add multiple rows within a single condition:
- Click the condition tile
- Click Add Rule in the condition panel
- Each row is evaluated with AND logic — all must be true
For OR logic, you need separate conditions with separate action paths, or create multiple business rules.
Setting Field Values Automatically
Beyond visibility, business rules can set field values:
Example: When Priority equals High, set SLA Days to 3.
- Condition:
PriorityEqualsHigh - True side: Set field value →
SLA Days=3
You can set a field to a static value, or to the value of another field on the form.
Making Fields Conditionally Required
Example: When Status equals Approved, make Approved By required.
- Condition:
StatusEqualsApproved - True side: Set business required →
Approved By - False side: Set not business required →
Approved By
This shows the red asterisk and prevents saving if the field is empty.
Common Mistakes and How to Fix Them
Show/Hide Doesn’t Work
Cause 1: Scope is set to Entity. Show/Hide actions only run on forms. Change scope to “All Forms” or a specific form.
Cause 2: The field isn’t on the form. A business rule can only show or hide a field that exists on the current form. If the field was removed from the form layout, the rule has nothing to toggle.
Cause 3: JavaScript is overriding it. If there’s JavaScript on the form that also controls the same field’s visibility, it can conflict with the business rule. JavaScript runs after business rules, so it wins.
The Rule Works on One Form But Not Another
If scope is set to a specific form, it only runs on that form. Change it to “All Forms” or create a copy for the other form.
Hide Doesn’t Clear the Field Value
Hiding a field doesn’t blank it out. If a user selects “Credit Card,” fills in the card number, then changes payment method to “Check,” the card number is now hidden but still saved. Add a “Set field value” action on the false side to clear it:
- False side: Set field value →
Card Number= blank
Business Rule Stops Working After Adding a Column
If you add a new column to the condition and the column doesn’t exist on the form, the condition may silently fail. Make sure every column referenced in the business rule is present on the form.
Evaluation Order Is Confusing
If you have multiple business rules on the same table, they run in alphabetical order by name. If two rules control the same field and contradict each other, the last one wins. Name your rules carefully (e.g., prefix with numbers like “01 - Payment visibility”) to control the order.
When to Use Business Rules vs JavaScript
Business rules are great for simple conditional logic: show/hide, lock/unlock, set a value, make required. They’re visual, no-code, and easy for non-developers to maintain.
Reach for JavaScript when you need:
- Complex conditions (OR across different fields, date comparisons, regex)
- Lookups to other tables (business rules can only see fields on the current form)
- Async operations (calling APIs, waiting for data)
- Controlling subgrids, tabs, or sections (business rules only target fields)
For the simple stuff, business rules are the right tool. Don’t overcomplicate it.
Related articles
Subgrids Done Right
Subgrids show related records directly on a form. Here's how to add them, choose the right relationship, filter the records, enable inline editing, and set up a New button that pre-fills the parent lookup.
JavaScript in Model-Driven Apps: Patterns That Actually Matter
A senior D365 developer's guide to JavaScript in model-driven apps — form events, Xrm.WebApi, field manipulation, async OnSave, debugging, and the patterns you'll actually use in production.
Adding Custom Buttons to the Command Bar in Model-Driven Apps
Step-by-step guide to adding a custom command bar button to a Dataverse table in a model-driven app — using the modern Command Designer, no XML editing required.