<-- Back

Passing an Empty String as a Parameter in Microflow

Issue

When empty string values are passed as parameters in microflows (the parameter can be present but not used):

  • Passing an empty value is treated as not available.

  • Passing an empty string ('') to a microflow causes an error during execution.

Environment

Studio Pro (all versions).

Cause

When a String parameter is passed without a value, the system interprets it as not available, effectively treating an empty string ('') as a null value. This leads to the UI disabling actions that depend on that parameter, which is expected behavior.

However, when an explicit empty string ('') is passed to a microflow during execution, it results in an error. This indicates a discrepancy between how empty string values are interpreted at the UI level versus during microflow execution.

Solution / Workaround

It is not possible to pass an empty value as an argument in a microflow because it is treated as null

Instead, pass an empty string ('') by using a nanoflow as a bridge between an argument and a microflow. The nanoflow passes the empty string to the microflow, which allows the microflow to execute successfully.

Steps:

  1. Create a new nanoflow.

  2. Add an action in the nanoflow to call the required microflow that has a string parameter value set to ''.

  3. Use the nanoflow to trigger the microflow.

Internal information related

  • 233648

Additional information

Mendix documentation:

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.