You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having this a global variable (multi value variable), and we are not able to read the actual position of the variable. We are been forced to set the index of the array statically:
Multivalued variable-> environment_value with values (int, nft)
In the JSONata field we can only access to the the values using the array index ($environment_value[0] or $environment_value[1]). We should be able to access to the current value using ${environment_value} or $environment_value.
Do you have any suggestion about how to access to the actual parameter without the need to set the index in the array?
Quoting the documentation Dashboard variables are available as JSONata variables, e.g. $instanceName. Since dashboard variables can have multiple values, the JSONata variable is always an array. If your variable contains a single value, you can use $instanceName[0] to index the first value in the array.
Given Dashboards variables are an array, if we are using the variable in a Dashboard Row to loop over the values of a variables, how can we know which index of the array we are in? can we access to the actual iterator? or can we just use the actuakl value accessing to the variables (as in JsonPath) using the variable reference like: ${environment_value}
The text was updated successfully, but these errors were encountered:
Hi,
We are having this a global variable (multi value variable), and we are not able to read the actual position of the variable. We are been forced to set the index of the array statically:
Panel Url request: http://localhost:3000/d/h5tWCggVz/app?orgId=1&var-cluster_zone=k8&var-environment_value=int&var-environment_value=nft&editview=templating
Multivalued variable-> environment_value with values (int, nft)
In the JSONata field we can only access to the the values using the array index ($environment_value[0] or$environment_value[1]). We should be able to access to the current value using $ {environment_value} or $environment_value.
Do you have any suggestion about how to access to the actual parameter without the need to set the index in the array?
`($lookup($ .teamDashboards, $cluster).applications[*].environments[name = $envirovement];
$searchEnvironment := function($cluster, $envirovement) {(
$status :=
)};
$r := $searchEnvironment($cluster_zone[0], $environment_value[0]).canaryStatus ;
)`
Quoting the documentation Dashboard variables are available as JSONata variables, e.g. $instanceName. Since dashboard variables can have multiple values, the JSONata variable is always an array. If your variable contains a single value, you can use $instanceName[0] to index the first value in the array.
Given Dashboards variables are an array, if we are using the variable in a Dashboard Row to loop over the values of a variables, how can we know which index of the array we are in? can we access to the actual iterator? or can we just use the actuakl value accessing to the variables (as in JsonPath) using the variable reference like: ${environment_value}
The text was updated successfully, but these errors were encountered: