ShowByCondition

Content Type: Widget
Categories: User Interface

Overview

This widget will hide or show its parent element, based on the result of a microflow or nanoflow returning a Boolean such that more complex visibility conditions can be composed.

Documentation

Demo url

Documentation

Description

By default, Mendix allows to make elements conditionally visible based on a boolean value within the attribute. This widget allows for much more functionality, by enabling the connection of a Microflow.

Typical usage scenario

  • Show a container with associated objects only when there are associated objects.
  • Show a field based on the status of a related object.

Features and limitations

  • Show a parent element based on a boolean value resulting from any Microflow.
  • Only works within elements that should be displayed as a 'block'.
  • Hide an element by classname, based on a boolean value resulting from any Microflow.

Configuration

  1. Create a microflow that has the Context Entity as input parameter.
  2. End the microflow with a boolean value, which determines whether an element should be shown (true) or not (false). 3.a. Add the widget inside the element that you want to show or hide. This element can of course contain more sub-elements. 3.b. Add the widget next to the element that you want to show or hide. Configure this element's class in the widget, to hide based on the microflow outcome.

Releases

Version: 1.4.0
Framework Version: 7.14.1
Release Notes: Ability to call nanoflows from the widget.