Skip to content

Conversation

@alihcsumer
Copy link
Contributor

A new document has been added to document the newly introduced return value mapping feature

@alihcsumer alihcsumer force-pushed the wtf/actionreturnvalues branch from 33962ee to 689be7e Compare November 18, 2025 14:42

## Introduction

Pages and snippets can use [return values](/refguide/end-event/#return-value) when calling microflows or nanoflows by specifying a return value mapping. This feature enhances microflow and nanoflow reusability by allowing pages to update local values based on flow return values without needing to pass objects containing those attributes to the flow.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From which Mendix version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11.6

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually 11.5, which is now in the release phase.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info, and the correction.
@Yiyun333 - can you pick this up, and make sure that the appropriate version information is added while you are proofreading? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alihcsumer can we retake this screenshot? I don't like the dots border on the Variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


## Introduction

Pages and snippets can use [return values](/refguide/end-event/#return-value) when calling microflows or nanoflows by specifying a return value mapping. This feature enhances microflow and nanoflow reusability by allowing pages to update local values based on flow return values without needing to pass objects containing those attributes to the flow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the second sentence runs a bit long and mixes concepts. I would break it up like this:

This feature enhances microflow and nanoflow reusability by allowing pages to decide how to use return values. Previously, modifying values on the page from a microflow or nanoflow required an additional entity passed as a parameter. Resulting in many page specific variations of the same logic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Return values can be mapped to available variables on the page or snippet. Both primitive and object return value types are supported. Using an expression, the return value can be transformed as needed before assignment.

{{< figure src="/attachments/refguide/modeling/application-logic/microflows-and-nanoflows/parameter/return-value-mapping-list.png" width="500px" class="no-border" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the part about multiple return mappings here. It is currently mentioned under Object Return Values, but it applies to Primitive Return Values as well.

Copy link
Contributor

@weirdwater weirdwater Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you. I cannot resolve the thread, so: ✅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of the current outline. I would suggest the following:

  • Introduction
    • (can stay mostly the same, but include a paragraph on adding multiple mappings)
  • Supported Return Values
    • Supported Primitive Types
    • Object Attributes
    • Lists not supported
  • Transforming Return Values
    • Explain how the $ActionReturnValue is used
  • Page Variable Assignment
    • What page variables are available as targets
    • Type matching (and how expressions can affect this)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice rewrite ✅

@alihcsumer alihcsumer force-pushed the wtf/actionreturnvalues branch from 2c701cb to 6a61113 Compare November 20, 2025 09:56
@weirdwater
Copy link
Contributor

@Yiyun333 @MarkvanMents, this PR is now ready for TW review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants