Menu
Open source

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

ts
Collection(Prod,pd,Non Prod,np,Development,dev,SIT,sit)
Display ValueValue
Prodpd
Non Prodnp
Developmentdev
SITsit

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.

ts
CollectionLookup(pd, prod - server, np, nonprod - server, dev, dev - server, $Nested);

image

image

image

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.

VariableOutput
UnixTimeStamp()Current browser timestamp in ms
UnixTimeStamp(s)Current browser timestamp in s