I would like to use an Environment variable with a @If modifier. As an example, I have an Environment variable called PROD that can be either Y or N. I would like to create a menu button that uses an @if modifier to test this PROD variable and then act accordingly.
function OnClick(clickData)
{
var shell = new ActiveXObject("WScript.Shell");
var isProd = shell.ExpandEnvironmentStrings("%PROD%").toUpperCase() == "Y";
if (isProd)
{
DOpus.Output("Prod");
}
else
{
DOpus.Output("Staging");
}
}