Hi !
Today variables can’t refer to Object, and it would be very useful.
For example in a microflow with following algorithm :
If it was possible to define a variable of type Object, then it would be possible to do :
There are more complex scenario’s where this would be a great addition!
Hi Erik,
Yeah, that’s what I currently do
What you’re describing here is actually one of the most common patterns you’ll find in Mendix applications: the GetCreate.
Using this microflow as a sub, will leave the calling microflow unconcerned how the object was instantiated. In the use case you describe, this folds all your requirements into one, bar the update. You’ll most likely want to follow this subflow with a change on the object in another subflow.
By the way, this gets even more flexible with inheritance and return values.