Global ENV Variable Do Not Work For Direct DB Connection

Continuing the discussion from Using Global Environment Variables:

The doc above does not show the error that occurs in DB Manager UI, after the above process.
It has been asked and answered here: $ENV Global Variable not work in DB Connection

So, if DB manager does not support ENV variables, when the DB manager connection is created automatically, it should use the values of those ENV variables as set in Globals settings as per the current target. It can anyways have only 1 set of values, so current target’s values make sense rather than building a feature that creates errors in the system.

Ideally, it should also look for the values of these ENV variables in .env files, rather than just Globals.

Lastly, the doc should clearly state hwo the DB manager will work when ENV variables are used while creating a new connection in Globals.

Global ENV variables do not work with the direct connection and are not supposed to work there.
If you are using ENV variables in the Server Connect Database Connections, then you need to open and edit the Direct Connection settings in the DB manager with the direct connection details.

Please add this to the doc above.

Not sure why Wappler team is comfortable with feature that breaks things in the project.