Skip to content

Menu Path Conditions

Menu path conditions, powered by BizzStream expressions, allow precise control over the navigation flow in your menus. Administrators can configure which menu block will be opened based on specific conditions. These conditions could be driven by user actions, selections, or field values. Path conditions enable complex menu navigation scenarios while maintaining user-friendly interactions.

Understanding Path Conditions

Path conditions work by defining rules that determine which menu block should be opened when a specific condition is met. For example, a path condition could trigger the opening of a menu block when a certain item is clicked in a treeview block or when a particular field holds a specific value. Multiple path conditions can be added to a path, ensuring accurate navigation based on various user interactions.

These conditions are evaluated in the order they are configured. If multiple conditions could lead to the same menu block, each scenario should have its own path condition. The first condition that evaluates to true will trigger its target menu block to open. This holds true even when multiple target menu blocks are available.

Configuring Path Conditions for Treeview Blocks

For treeview blocks, you can establish path conditions at the individual treeview item level. BizzStream simplifies this process by automatically generating a basic path condition when you create a path for a treeview item. Typically, you want BizzStream to open a menu block when a user clicks the associated item. BizzStream takes care of the necessary expression to achieve this. However, administrators can extend this expression to cover more complex scenarios where the same treeview item can lead to one of several menu blocks.

Achieving Fine-Grained Control with Path Effect Dependencies

In certain scenarios, it's important to have more control over menu block behavior. Path effect dependencies come into play here, enhancing the control over when menu blocks should be re-opened. With path effect dependencies, you can associate a filter with a menu block to regulate its opening. When an effect dependency is provided, it refers to a specific value, such as an _id.

When a menu block is opened, the effect dependency values (e.g., _id) are stored. The next time the condition for opening the same menu block resolves to true, the block will only open if the effect dependency values have changed since the last opening. This prevents the menu block from re-opening unnecessarily due to unrelated changes.

Example:

  • Condition: NOT(ISBLANK(SELECTED(CTRL["company-grid"],"_id")))
  • Effect dependency: SELECTED(CTRL["company-grid"],"_id")

In this case, the condition ensures that a row must be selected for the next menu block to open. The effect dependency restricts the opening to changes in the selected row. This guarantees that a closed menu block won't re-open when unrelated layout values change, such as selecting other rows.

Adding and Configuring Paths

Adding path conditions involves defining properties for a menu block. For treeview blocks, path conditions are established at the individual treeview item level. To add a path, click the Add Button button next to Paths. You can delete a path by clicking the Delete Button button which appears if you hover the path. A menu path has the following properties:

Target block (Required)
Determines the block that should be opened if the path condition is true.

Condition (Optional)
A BizzStream expression that determines whether the target block should be opened.

Effect dependency (Optional)
A BizzStream expression that determines whether a menu block needs to be re-opened based on whether its outcome changed.
Treeview Item Properties