The Complete Guide to Placeholders in Business Rules
Introduction
Imagine showing a user an error message that says: "Value exceeds limit." While technically informative, it leaves users asking critical questions: Which value? What limit? By how much? What should I do?
Now imagine showing: "Credit limit exceeded. Customer ACME Corp has credit limit $50,000 but current balance $45,000 plus this order $10,000 would total $55,000, exceeding the limit by $5,000. Please reduce order amount, collect payment, or request credit limit increase."
The difference? Placeholders—dynamic field references that transform generic messages into specific, actionable, helpful communications that empower users to resolve issues immediately.
Placeholders are one of the most powerful yet underutilized features of QUALIA Rule Engine. This comprehensive guide explains what placeholders are, how they work, where you can use them, advanced techniques for complex scenarios, troubleshooting common issues, and best practices for creating messages that users actually appreciate.
What Are Placeholders?
Definition
A placeholder is a dynamic reference to a field value that gets replaced with the actual data when the rule executes.
Syntax: [TableNumber:FieldNumber]
Example:
[18:2]→ Customer Name from table 18, field 2[36:109]→ Amount Including VAT from table 36, field 109[27:3]→ Item Description from table 27, field 3
How Placeholders Work
When QUALIA Rule Engine processes a rule action with placeholders:
Rule condition evaluates to TRUE
Action is triggered (Error, Warning, Email, etc.)
Engine identifies placeholders in action text (anything in
[TableNo:FieldNo]format)For each placeholder:
Lookup table number
Access specific field
Retrieve current field value
Replace placeholder with actual value
Final message displayed to user with all placeholders resolved
Example execution:
Why Placeholders Are Critical
Without placeholders (static messages):
With placeholders (dynamic messages):
Benefits:
✅ Users understand the specific issue
✅ Users see relevant data values
✅ Users know how to resolve the problem
✅ Reduces support tickets
✅ Faster problem resolution
✅ Better user experience
Placeholder Syntax and Components
Basic Syntax
Format: [TableNumber:FieldNumber]
Components:
Opening bracket:
[Table number: Business Central table number (integer)
Colon separator:
:Field number: Business Central field number (integer)
Closing bracket:
]
Examples:
Common Business Central Tables Referenced:
Table 18 - Customer: No. (1), Name (2), Credit Limit (59), Balance (61), Payment Terms (27), Blocked (39)
Table 36 - Sales Header: No. (3), Document Type (1), Amount Including VAT (109), Status (120), Order Date (99)
Table 27 - Item: No. (1), Description (3), Unit Price (18), Unit Cost (21/22), Base Unit of Measure (8)
Finding Table and Field Numbers
Method 1: Business Central Table Browser
Search for "Tables" in Business Central
Find your table (e.g., "Sales Header")
Note table number (e.g., 36)
Open table
Show fields
Find your field (e.g., "Amount Including VAT")
Note field number (e.g., 109)
Method 2: QUALIA Rule Engine Field Helper
In Rule Set, navigate to Conditions or Actions
Use Field Lookup feature (if available)
Select table
Select field
System inserts correct placeholder syntax
Method 3: Business Central Documentation
Official Microsoft documentation lists table and field numbers
Community resources and forums
BC object browser extensions
Common Business Central Tables (Reference):
Case Sensitivity and Spacing
Placeholders are NOT case-sensitive (generally):
Spacing is NOT allowed inside brackets:
Best practice: Use no spaces, consistent formatting: [TableNo:FieldNo]
Where Placeholders Can Be Used
1. Error Messages
Purpose: Explain why transaction is blocked with specific data
Syntax:
Example:
Placeholders Used:
[18:2]- Customer (Table 18): Name (Field 2) - Customer name[18:40]- Customer (Table 18): Blocked (Field 40) - Blocked reason (e.g., Ship, Invoice, Payment, All)
Best practices for error messages:
Explain what's wrong
Show relevant data values
Provide specific resolution steps
Include contact information if needed
2. Warning Messages
Purpose: Alert user to potential issue but allow them to proceed
Syntax:
Example:
Best practices for warnings:
Explain the unusual condition
Provide context with data
Allow user to make informed decision
3. Confirmation Messages
Purpose: Ask user to confirm an action with specific details
Syntax:
Example:
4. Email Notifications
Purpose: Send detailed notifications to stakeholders
Syntax:
Example:
Best practices for email notifications:
Clear, descriptive subject line
Structured body with key information
Include relevant context
Provide actionable information
5. Message Actions (Informational)
Purpose: Provide information without blocking transaction
Syntax:
Example:
6. Field Assignments
Purpose: Auto-populate fields with calculated or referenced values
Syntax:
Example 1: Simple assignment:
Example 2: Calculated assignment:
Note: Not all field types support placeholder-based assignment. Verify in QUALIA Rule Engine documentation.
7. URL Actions
Purpose: Provide links to external systems with dynamic parameters
Syntax:
Example:
Advanced Placeholder Techniques
Calculations with Placeholders
Placeholders can be used in arithmetic expressions:
Operators:
+Addition-Subtraction*Multiplication/Division
Example: Calculate total:
Example: Calculate difference:
Example: Calculate percentage:
Example: Complex calculation:
Order of operations: Standard mathematical precedence (parentheses, multiplication/division, addition/subtraction)
Formatting Placeholders
Currency formatting:
Note: Formatting capabilities depend on QUALIA Rule Engine implementation. Check documentation for supported formatting options.
Percentage formatting:
Date formatting:
Decimal places: System typically formats based on field definition in Business Central.
Conditional Placeholders (Text Logic)
Use case: Show different text based on field value
Approach: Use multiple rules with different conditions and messages
Example:
Each rule fires for different blocking reasons with appropriate message and contact info.
Multi-Table Placeholders
Use linked tables to reference related data:
Example: Sales Order referencing Customer and Item:
Table linking requirements:
Linked tables must be configured in Source References
Appropriate filters must exist to link tables
Fields from linked tables accessible via their table numbers
Placeholder in Subject Lines
Email subjects should be concise but informative:
Nested Calculations
Complex business logic can use nested expressions:
Another example:
Troubleshooting Placeholders
Problem: Placeholder Not Replaced (Shows Literal [18:2])
Symptoms: Message shows [18:2] instead of "ACME Corp"
Possible causes:
1. Incorrect syntax:
2. Spaces in placeholder:
3. Wrong table or field number:
4. Linked table not configured:
If placeholder references table other than trigger table
Ensure table is in Source References
Ensure link filters are correct
Debugging:
Check Validation Log for placeholder resolution
Verify table and field numbers in Business Central
Verify linked table configuration
Test with simpler placeholder first
Problem: Placeholder Shows Blank or Zero
Symptoms: Placeholder resolves but shows empty value or zero
Possible causes:
1. Field is actually blank:
Verify field has value in the record
Check if field is populated at trigger event timing
2. Wrong field number:
Verify correct field number
Easy to confuse similar field names
3. Linked table filter doesn't match:
No matching record in linked table
Filter configuration error in Source References
4. Timing issue with Before Insert:
Field not yet populated when Before Insert fires
Some fields populated after insert
Use After Insert if needed
Debugging:
Check actual field value in Business Central
Verify field value exists at trigger timing
Test with different field that definitely has value
Review linked table filter configuration
Problem: Calculation Placeholder Shows Wrong Result
Symptoms: [36:109] + [18:61] shows incorrect total
Possible causes:
1. Order of operations:
2. Division by zero:
3. Data type mismatch:
Integer division truncates decimals
Check field data types
4. Field units mismatch:
Debugging:
Test each placeholder individually
Verify data types
Check field units
Use parentheses to control order
Test with known values
Problem: Placeholder in Email Not Resolving
Symptoms: Email received with literal [18:2] instead of customer name
Possible causes:
1. Email system doesn't support placeholders:
Verify QUALIA Rule Engine version supports placeholders in emails
Check documentation for email action capabilities
2. Email sent before placeholder resolution:
Timing issue in rule engine
May be bug or limitation
3. Email template vs. dynamic content:
Some systems distinguish between template and dynamic content
Verify correct field for dynamic content
Debugging:
Test with simple placeholder first
Check if any placeholders work in email
Review QUALIA Rule Engine documentation for email action
Test with Message action first (known to support placeholders)
Problem: Special Characters in Placeholder Value
Symptoms: Placeholder value contains quotes, brackets, or special characters causing display issues
Example:
Solution:
QUALIA Rule Engine should handle this automatically
If issues occur, report as potential bug
Consider using different field (e.g., Customer No. instead of Name)
Best Practices for Using Placeholders
1. Always Provide Context
Poor:
Better:
Best:
2. Show Both Problem and Solution
Poor:
Best:
3. Use Descriptive Text Around Placeholders
Poor:
Best:
4. Verify Placeholder Values Are Available
Check timing:
Before Insert: Some fields may not be populated yet
After Delete: Record no longer exists (may not have access to fields)
Linked tables: Ensure related record exists
Test thoroughly:
Test with actual data
Verify placeholders resolve correctly
Check edge cases (empty fields, zero values, etc.)
5. Format Numbers Appropriately
Currency:
Percentages:
Quantities:
6. Avoid Overly Complex Calculations
Poor (too complex):
Better (use multiple placeholders):
7. Test Placeholders with Real Data
Don't assume placeholders work:
Create test transaction with known data
Verify placeholder shows expected value
Test with edge cases (blanks, zeros, large numbers)
Check formatting
8. Document Placeholder Meanings
In rule description, note what placeholders represent:
9. Consistent Formatting Across Rules
Establish standard format for similar messages:
10. Use Placeholders in Email Subjects
Make emails identifiable at a glance:
Common Placeholder Patterns
Pattern 1: Credit Limit Message
Pattern 2: Discount Authorization
Pattern 3: Inventory Warning
Pattern 4: Price Below Cost
Pattern 5: Large Order Notification
Pattern 6: Customer Blocked
Conclusion
Placeholders transform business rules from rigid, generic validations into intelligent, context-aware communications that empower users to understand and resolve issues independently.
Key principles:
Always use placeholders to:
Show specific data values
Explain exactly what's wrong
Provide actionable resolution steps
Reduce support burden
Master the syntax:
[TableNumber:FieldNumber]No spaces inside brackets
Use calculations:
([36:109] + [18:61])Verify table/field numbers
Design effective messages:
Explain the problem clearly
Show relevant data with placeholders
Provide specific resolution steps
Include contact information if needed
Test thoroughly:
Verify placeholders resolve correctly
Test with real data
Check edge cases
Validate calculations
Optimize for users:
Use clear, non-technical language
Format numbers appropriately (currency, percentages)
Structure messages logically
Be concise but comprehensive
By mastering placeholders, you transform error messages from frustrating roadblocks into helpful guides that enable users to solve problems efficiently and maintain productivity—creating business rules that users actually appreciate rather than merely tolerate.
Quick Reference: Common Business Central Tables
Related Reading:
Scenarios vs. Conditions: Mastering the Two-Tier Validation Model
Writing Effective Error Messages: User Experience Best Practices
Advanced Formula Techniques: Complex Business Logic Made Simple
Email Actions: Automated Notifications and Workflows
0 Code Rule Engine
>
What is Business Rules Management and Why Your Business Needs It
>
QUALIA Rule Engine: The Complete Introduction for Business Central Users
>
Business Rules vs. Custom Code: Which Approach is Right for You?
>
Understanding Trigger Events: How Business Rules Know When to Execute
>
Scenarios vs. Conditions: Mastering the Two-Tier Validation Model
>
The Complete Guide to Placeholders in Business Rules
>
Understanding Rule Sets and Rule Organization
>
Glossary & Index
>
5 Signs Your Business Central Environment Needs a Rules Engine
>
Understanding the Business Rules Lifecycle: From Design to Deployment
Related Posts
Glossary & Index
This section provides definitions of key terms and concepts used throughout this manual.
Understanding Rule Sets and Rule Organization
Imagine opening a filing cabinet where documents are thrown in randomly—no folders, no labels, no organization. Finding what you need would be frustrating and time-consuming. Now imagine that same cabinet with clearly labeled folders, logical groupings, and a sensible structure. The difference is dramatic.
The Complete Guide to Placeholders in Business Rules
Imagine showing a user an error message that says: "Value exceeds limit." While technically informative, it leaves users asking critical questions: Which value? What limit? By how much? What should I do? Now imagine showing: "Credit limit exceeded. Customer ACME Corp has credit limit $50,000 but current balance $45,000 plus this order $10,000 would total $55,000, exceeding the limit by $5,000. Please reduce order amount, collect payment, or request credit limit increase."
Get Your FREE Dynamics 365 Demo
Transform your business operations with Microsoft Dynamics 365 Business Central
Experience the transformative power of Microsoft Dynamics 365 Business Central for yourself! Request a free demo today and see how our solutions can streamline your operations and drive growth for your business.
Our team will guide you through a personalized demonstration tailored to your specific needs. This draft provides a structured approach to presenting Qualia Tech's offerings related to Microsoft Dynamics 365 Business Central while ensuring that potential customers understand the value proposition clearly.