Request current Space or DB connection environment


We have different Spaces per environment (eg. DEV, TEST, PROD)
Assume that if the environment = ‘TEST’ a few extra filters need to be applied.
Also assume the database for ‘TEST’ environment is named ‘SQL_TEST’.

I would like to use in an expression:

If (current) Space is ‘TEST’ then …

OR - if there’s no such thing:

If (current) connector contains(‘TEST’) then…

I looked at the metadata and system functions but can’t find one that can return such information.
Using the folder path is not really an option.

Thanks for your feedback

Hi Laurens,

The idiomatic way of dealing with environment settings is to use Shared Memory.

For instance, the connector name for the test database could be stored in the Shared Memory of the Test space as

Connectors/database: TEST_DB

Where Connectors/database is a key, and TEST_DB is the value associated with the key.

In the production space, the Shared Memory would hold a different value for the same key, for instance:

Connectors/database: PROD_DB

To read/update values in the Shared Memory use the “Shared Memory” action.

Hi Dmitry,
Many thanks for the insight and quick reply.
Kr, Lau