TDP 3.7 Settings - Run Mode Variable?

I created an automation script with copy file activities. I assigned variables for 2 different copy to directories, one for test and one for production. I would like to control which variable is used based on the run mode in the settings. Is there a system variable for the run mode drop down option? If not, could this be put on the list of enhancements? It would be really nice to be able to use in an if condition activity.

Put this suggestion in the idea pond. I want to vote for it.

What we just added is a PATH variable to the test/prod settings. Here you code all paths using that variable and the mode switches. Does that work for you? This might even be in the current Beta. I’d have to check

It sounds like the path variable might work. I’d have to see what exactly it is. The way my paths are for this particular project is as follows (simplified for this example):

\test\interface\US\new

\prod\interface\US\new

So would I put test or prod as the path variable set off by # # and then include the rest of the path - \#path_variable#\interface\US\new?

Yes, this is exactly the case. This new feature is also in the current Beta. Please download and try. In the settings activity you will see a new var named ROOT_PATH but you can change it to a name of your liking. Then set what the directory is for test and prod. When using this var for output files use it in the manner you mention: #ROOT_PATH\myfilename.ext

Okay, forget about Idea Pond. This is great. You could also test the value in the path variable to conditionally do different stuff.

Actually i’d vote for this idea despite the availability of the root path variable.

Many times i came to scenarios where in prod environment you were supposed to execute additional tasks (activities) such as amending mail subject or not-attaching debug helper files such as logs or even storing the environment type (prod/test) value in database/log files…

so if we have a string variable [tag:RunMode]# with a values like ‘TEST’ and ‘PRODUCTION’ then you can design more precise scripts using the if-else activity…

Agreed, but you could do the same with the #PATH# variable if the value is different between test and prod. I still would prefer your [tag:RunMode]# variable as that would work in all cases and easier.

I submitted an idea to the pond. It’s a little different - my idea is to have to variable value fields when you create a variable, 1 for test, 1 for prod. This way you could even create things like email subject variables that would have something like “TEST” in the subject when it is a test, and just a regular subject when you aren’t testing. I will definitely check out the path variable though.