Naming in microflows - Mendix Forum

Naming in microflows

4

In Mendix Studio Pro, when we create multiple loops within a microflow, loop iterate variable names and activity names must be unique across the entire microflow. If the same name is used again, Studio Pro automatically renames it by adding suffixes like _2, _3, etc.

 

From a traditional coding perspective, everything inside a loop is considered locally scoped, which means using the same iterate variable name inside separate loop blocks is perfectly acceptable and more readable. However, in Mendix, loops share a global naming scope, which forces developers to manually create different names for identical loop-specific logic, reducing clarity and increasing naming complexity.

 

My suggestion:

Enable local scoping for loop iterate variables and activity names so that the same identifiers can be reused inside independent loop blocks without automatic renaming. This would improve readability and align with standard programming language behavior.

asked
1 answers

Put the loops in different sublfows and your problem is solved. It also makes your main flow more readable.

Created