Page Variables: Support initializing page variables at the microflow call-site - Mendix Forum

Page Variables: Support initializing page variables at the microflow call-site

9

https://docs.mendix.com/refguide/page-properties/#variables

 

It's great to see that Page Variables are now part of Mendix in 10.21. This is a very welcome edition. However, I immediately ran into a significant limitation and a major reason for why we use helpers in the first place. It's very common to have some computed state that's only relevant to your page. Page Variables are not settable at the call-site (via a microflow). They're only assignable via existing attributes or easily computable expressions.

 

It would be nice to extend this at least to page microflow calls as you can more easily centralize some computations rather than sprawling them out on a page by page basis. (Even better would be to support nanoflow functions that return primitives).

 

 

asked
1 answers

Hi Ryan,

Thanks for coming up with this. I was so happy to see that page variables are now available, but I immediately ran into the same issue!

In my case, I often use helper entities to pre-set a tab container to a specific tab. This sometimes makes it even more difficult because of the additional logic required to ensure the helper entity is always set to the intended tab.

I thought page variables would solve this by allowing me to set the page variable from the "open page" settings or at least from the microflow "open page" activity, but neither is possible. 

Hope this will be seen by the right people!

 

Cheers,

Jan

 

Created