Hi Sajjad,
Constants can't be changed at run time. You would have to change the value in the sprinter portal and then restart your environment for the new values to take effect.
Here is some documentation on constants
https://docs.mendix.com/refguide/constants
From what you explained in your question, it sounds like you would need to use an enumeration. You would create an entity that had an attribute called "Country" and another attribute called "City". Both attributes would be of type enumeration and you would be able to define the list of possible values in the modeler. Then in a microflow or on a page you could change or edit this record based on the value of "Country".
Here is some documentation on enumerations
https://docs.mendix.com/refguide/enumerations
Hope this helps!
Unfortunately, this doesn't answer the query. I know about enumerations. But that's not what I'm looking for. I'm not trying to define an enum of Countries and Cities. Let's say this particular City and Country is to be used in displaying somewhere in the app. I'm not concerned with all the Cities and Countries of the world. I need to display the values of these constants which are configured in the environment settings. Based on which client is using the app, the client should be able to configure the City and Country.
My concern was how can I make the value of these configuration settings be read from one another. This is similar to how we can declare properties in a Spring application.
Further, I understand, once the application starts, these values cannot be changed without rebooting the application.
Your best solution would be to use the Deploy API to programatically set the values of your constants, using the GetEnvironmentSetting and SetEnvironmentSettings operations.