Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Legacy Variables
Legacy/Utility variables are type of variables that used to create variables using different utility methods such as joining two strings. More examples and different types of Utility variables are given below
Collection
List of key value pair wrapped with Collection()
. Text/key followed by values separated by commas.
For example, the query Collection(Prod,pd,Non Prod,np,Development,dev,SIT,sit)
produce 4 variables
Collection(Prod,pd,Non Prod,np,Development,dev,SIT,sit)
Display Value | Value |
---|---|
Prod | pd |
Non Prod | np |
Development | dev |
SIT | sit |
Under the hood following 4 keys have corresponding values
CollectionLookup
Return values based on another value similar to VLOOKUP in excel. For example, CollectionLookup(pd,prod-server,np,nonprod-server,dev,dev-server,$Nested)
will return nonprod-server
if value of $Nested
equals np
. Last value should be the key to lookup.
This will be useful when multiple variables need update based on single variable.
CollectionLookup(pd, prod - server, np, nonprod - server, dev, dev - server, $Nested);
Join
Joins multiple strings / variables and return as a new variable
Example : Join($Environment,-hello-,$ServerName)
will produce a new string variable from three separate strings.
Random
Example : Random(A,B,C)
will produce one of A/B/C. When creating a variable of this type, set it to refresh “on time range change”, so it will produce random element when dashboard refreshes.
More details available in this github issue.
UnixTimeStamp (alpha)
Return relative timestamp in unix timestamp.
Variable | Output |
---|---|
UnixTimeStamp() | Current browser timestamp in ms |
UnixTimeStamp(s) | Current browser timestamp in s |