environment-identification

Environment Identification

Stable version 2.0.2 (Compatible with OutSystems 11)
Other versions available for 10
Published on 11 March 2019 by 
4.0
 (1 rating)
environment-identification

Environment Identification

Details
Functionality for Environment Identification (Development, Testing, Production). Based on a Site Property that must be correctly configured for each environment (DEV, TST, PRD). Application Objects (AOs) used: 1 (web screen).
Read more

Functionality for Environment Identification (Development, Testing, Production).

Implementation is based on a Site Property that must be correctly configured for each environment (DEV, TST, PRD), and NOT on any platform metadata.

Provides a public web block 'EnvironmentLabel' that can for example be inserted in the Header web block of a theme; and also actions to enable to identify the current environment: EnvironmentIsDevelopment(), EnvironmentIsTesting(), and EnvironmentIsProduction(). Environment_GetLabel().

Application Objects (AOs) used: 1 (web screen).

What’s new (2.0.2)
  • Update to OutSystems 11
  • New action Environment_GetLabel()
    Returns a label text for the current environment. Several examples: "(Development)", "(Tst) ", "(Testing) ", "(Unknown environment)", "(Production) ", or empty ("").
Reviews (1)
2020-10-28
in version 2.0.2
The description is incorrect. I posted a Support Query, and didn't get a response. After resolving it myself and marking it as solved, it was removed. So this is for other potential users.

Look under Logic, change the lower 3 calls(EnvironmentIsDevelopment() , EnvironmentIsTesting() , EnvironmentIsProduction() ).

In each Assign, change the "DEV", "TST" and "PRD" to "dev", "tst" and "prd" respectively.  (Site.EnvironmentType_Max3Chars = "dev")

And remember under Data, Site Properties - EnvironmentType_Max3Chars to the aforementioned LOWER CASE versions despite what the description says.

Otherwise, this is exactly what I need for my current (and future) projects
Related assets
More from Tiago Bernardo