About Display Rules (needs work)

Display rules control how fields and content appear in your elements based on specified conditions. They enable dynamic behavior by showing/hiding content, changing styles, and modifying labels based on user actions or data values.

 

What You'll Learn

  • How to create and configure different types of display rules
  • Ways to control element visibility and appearance
  • Methods for implementing conditional formatting
  • Techniques for managing rule precedence and evaluation
  • Best practices for organizing and structuring rules
  • Troubleshooting common display rule challenge

Rule Types

Dynamic Rules

  • Always active and continuously evaluated
  • All rules are checked
  • Last matching rule takes precedence
  • Best for persistent state management

On Change Rules

  • Triggered by field changes
  • Evaluation stops at first match
  • Used for one-time reactions to changes
  • Ideal for sequential logic

Available Actions

Form and Details Elements

  • Show/Hide: Toggle visibility based on conditions
  • Show: Display when conditions are met
  • Hide: Conceal when conditions are met
  • Rename Label: Modify field labels dynamically
  • Set Background: Change background color
  • Set Text Color: Modify text color
  • Set Text Style: Apply formatting (bold, italic, strikethrough)

Table Elements

  • Set Text Color: Change cell text color
  • Set Text Style: Apply cell text formatting
  • Set Background Color: Modify cell background
  • Display Icon: Add conditional icons
  • Hide Value: Conditionally hide cell content

Rule Evaluation

Order of Operations

  1. Rules process top to bottom within groups
  2. Dynamic rules can override On Change rules
  3. For same rule types, last matching rule wins
  4. Multiple matching rules with different actions all apply

Precedence Rules

  • Dynamic rules take priority over On Change rules
  • Within same rule type, later rules override earlier ones
  • Mixed rule types follow dynamic rule precedence

Best Practices

Rule Organization

  1. Group similar rule types together
  2. Place On Change rules before Dynamic rules
  3. Organize Dynamic rules from general to specific
  4. Order On Change rules from specific to general

Rule Structure

  • Use one rule type per form when possible
  • Keep conditions focused and specific
  • Avoid mixing rule types unless necessary
  • Document complex rule interactions

Performance Tips

  • Minimize number of conditions
  • Use efficient condition checks
  • Group related rules
  • Test edge cases

Implementation Guidelines

For On Change Rules

1. Most specific conditions first
2. Intermediate conditions
3. General fallback conditions

For Dynamic Rules

1. Default behaviors
2. Common cases
3. Special cases
4. Exceptions

Troubleshooting

Common Issues

  • Hidden fields don't store values
  • Unexpected rule precedence
  • Conflicting rule conditions
  • Rule evaluation timing

Solutions

  • Verify rule type selection
  • Check rule order
  • Test condition combinations
  • Validate action conflicts

Migration Notes

Version 4 Changes

  • New rule type system
  • Updated precedence rules
  • Enhanced styling options
  • Clearer condition handling

Backwards Compatibility

  • Existing rules may need restructuring
  • Review rule sequences
  • Test mixed rule types
  • Validate intended behaviors

Warning: Hidden form fields do not store values - ensure critical data fields remain visible or use alternative storage methods.

Tip: When in doubt, use Dynamic rules for consistent state management and On Change rules for sequential logic.

Advanced Features

Conditional Formatting

  • Color coding based on values
  • Dynamic style application
  • Icon-based indicators
  • Custom text formatting

Complex Conditions

  • Multiple condition groups
  • Connected field references
  • Formula-based conditions
  • User role conditions

Related Resources

  • [Form Element Guide]
  • [Table Element Documentation]
  • [Condition Building Guide]
  • [Field Configuration]