Are there global variables in Mendix?

1
Hello  ,   I used to develop in C #, and I knew I could use global variables, but how should I use it in Mendix? I need to use the same data elsewhere in the project, which is changing in real time. Thanks
asked
2 answers
3

If you want to change the variable in the runtime, you'll have to make an object to store it in an attribute (e.g. an ApplicationSettings object with an attribute for how long inactive user accounts are kept). If you make a find or create flow wherever you need the object, you should always only have one, so performance impact and such on your application should be minimal. 

answered
0

You can create a Constant in your module. Constants can be used in many places.

  1. Expression editor window, whether its a microflow box or any other expression editor. Constants can be added by starting with @ symbol
  2. Inside a Java Action

 

Its really handy and is similar to Global variable in any programming language

answered