We have a new community! Please visit support.timextender.com
Follow

How to create an Environment Specific Project Variable

TimeXtender support multiple environments, aligning with the ideals of CI/CD and Agile development. Along with these environments, developers need to apply business logic to only one of the environments. Using Project Variables is a great way to programatically apply this custom business logic, for a variety of purposes.

System Project Variables allow you to use system names as project variables, to be leveraged in your SQL code, Execution Packages, and Project Perspectives. This is yet another way that TimeXtender makes it easy to develop complex data solutions without leaving the TX platform.

System project variables include:

  • Machine Name
  • Environment Name
  • User Name
  • User Domain Name

Example Use Case - System Variable: Environment Name

If we wanted to apply a project variable in the Development environment programmatically, we can use a system variable (i.e. Environment Name). After creating the System project variable, we can apply this system project variable with a custom condition and a fixed value to the Development environment. For example, maybe you would like an Execution Package to only run in your Development environment but not your Test or Production environments.

 

Prerequisites

In order to use the Environment Specific project variable, you'll need to have at least one environment created in TimeXtender. To learn more about environments in TimeXtender and get help setting up, please see Configure Multiple Environments or contact your TimeXtender Partner or Solution Specialist.

 

How to create an Environment Specific project variable

  1. In TimeXtender, select Project Variables under the Tools menu in the toolbar.
  2. Select Add to create the new project variable.
  3. Provide a Name for your new project variable.
  4. Select System in the Type drop-down.
  5. Select Environment Name in the Value drop-down menu.
  6. Click OK.

mceclip0.png

 

How use an Environment Specific project variable with an Execution Package

  1. To begin, open the Execution object in the Solution Explorer, by double clicking the name.
  2. Right-click the execution package to apply the project variable, and select Add Usage Condition. The right side of your screen will show Project Variables, including the one you've just created.
  3.  Select your Environment Specific project variable from the list.
  4. The defaults for Operator and Comparer don't require a change, but you'll enter the exact name of the Environment in the Value field.
  5. Click Add.

mceclip1.png

Was this article helpful?
1 out of 1 found this helpful

0 Comments

Please sign in to leave a comment.