How can I have conditional parameter value in Azure Workbook?
I want to have one parameter called environment. It has some text values. E.g. it has two values test
and production
.
Also, I want to have two other parameters: subscription and app_insights.
Now, I want to select the subscription and app_insights values automatically based on the environment parameter value.
So, here is how I am trying to select the test subscription for the subscription parameter when the environment parameter is test
:
summarize by subscriptionId
| project subscriptionId=strcat("/subscriptions/", subscriptionId),
selected = case("{environment}" == "test" and subscriptionId == "test subscription id", true, false)
But it seems that the environment parameter does not get substituted for the "{environment}"
placeholder. If I remove the "{environment}" == "test"
check, then the test subscription gets selected as expected.
How can I use one parameter to decide the value of another parameter? Is there a better way to achieve what I want? Preferably I also want the subscription and app_insights parameters not to be shown to the user of the workbook and prevent them from being edited manually.