{"_id":"569ea9bdc237d225002df5b6","__v":7,"version":{"_id":"55fc9b793c21291900e7e0d7","__v":12,"project":"5553d36165e8260d0024419a","createdAt":"2015-09-18T23:17:13.545Z","releaseDate":"2015-09-18T23:17:13.545Z","categories":["55fc9b7a3c21291900e7e0d8","55fc9b7a3c21291900e7e0d9","55fc9b7a3c21291900e7e0da","55fc9b7a3c21291900e7e0db","55fc9b7a3c21291900e7e0dc","55fc9b7a3c21291900e7e0dd","55fc9b7a3c21291900e7e0de","55fc9b7a3c21291900e7e0df","55fc9b7a3c21291900e7e0e0","55fc9b7a3c21291900e7e0e1","55fc9b7a3c21291900e7e0e2","55fc9b7a3c21291900e7e0e3","55fc9bad4c80910d00b9bece","56394a0c3539050d00082122","56394a2f68b11f0d0048c9ff","56394a462fc5520d001a4db3","56394a4c2fc5520d001a4db4","56394a5b049e420d00476b5c","56394a6a2fc5520d001a4db5","56394f791593e4190073a44b","567b3adfb56bac0d0019d8d9","569d590e5a2b060d008741eb","569ea93dffccd10d00a05c7f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"project":"5553d36165e8260d0024419a","user":"5553d33065e8260d00244199","category":{"_id":"569ea93dffccd10d00a05c7f","__v":5,"version":"55fc9b793c21291900e7e0d7","pages":["569ea97fd233620d007055cc","569ea9bdc237d225002df5b6","569eae7e8f6d4b0d00f13b61","569eaed5c237d225002df5bd","569eaf04c237d225002df5bf"],"project":"5553d36165e8260d0024419a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-19T21:23:09.676Z","from_sync":false,"order":11,"slug":"environment-variables","title":"Environment variables"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-19T21:25:17.260Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The general expression for defining environment variables has the following form \n\n**{{ *var_1* | *var_2* | *workspace_1*.*var_3* | $*”any alternative text”* }}**\n\nThe environment variable expression must aways be written between a pair of opening braces and a pair of closing braces. The spaces in the expression can be omitted (the expression can be written with or without spaces). For instance, the above expression can be written as **{{*var_1*|*var_2*|*var_3*|$*”any alternative text”* }}**. Adding spaces increases readability,\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**{{**\",\n    \"0-1\": \"Marker for the beginning of an expression\",\n    \"2-1\": \"Marker separating alternatives\",\n    \"2-0\": \"**|**\",\n    \"1-0\": \"**}}**\",\n    \"1-1\": \"Marker for the end of an expression.\",\n    \"3-0\": \"**var_1**\",\n    \"3-1\": \"**var_1** First variable name to be searched for. Variable names can be composed of any letter from **a** to **z** and **A** to **Z**, any digit from **0** to **9** and the underscore char **_**\",\n    \"4-0\": \"***var_2***\",\n    \"4-1\": \"Variable name to be searched for if ***var_1*** is not defined\",\n    \"5-0\": \"***workspace_1***\",\n    \"5-1\": \"Workspace from which to retrieve ***var_3***\",\n    \"6-0\": \"**.**\",\n    \"6-1\": \"Delimiter between workspace name and variable name\",\n    \"8-0\": \"**$**\\\"***any alternative text\\\"***\",\n    \"8-1\": \"Alternative text if none of the variables are defined. Always the last element of the expression to be defined. Begins with:** $”** and end with: **“**\",\n    \"7-0\": \"***var_3***\",\n    \"7-1\": \"Variable name to be searched for, if ***var_2*** is not defined.\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]\nThe variable expression is read as:\n\nReturn ***var_1*** if defined.\n\nIf ***var_1*** is not defined, return ***var_2*** if defined.\n\nIf ***var_2*** is not defined, return ***var_3*** from ***workspace_1*** if defined.\n\nIf ***var_3*** is not defined in ***workspace_1***, return the alternative text ***“any alternative text”***.","excerpt":"","slug":"variable-expression-syntax","type":"basic","title":"Variable expression syntax"}

Variable expression syntax


The general expression for defining environment variables has the following form **{{ *var_1* | *var_2* | *workspace_1*.*var_3* | $*”any alternative text”* }}** The environment variable expression must aways be written between a pair of opening braces and a pair of closing braces. The spaces in the expression can be omitted (the expression can be written with or without spaces). For instance, the above expression can be written as **{{*var_1*|*var_2*|*var_3*|$*”any alternative text”* }}**. Adding spaces increases readability, [block:parameters] { "data": { "0-0": "**{{**", "0-1": "Marker for the beginning of an expression", "2-1": "Marker separating alternatives", "2-0": "**|**", "1-0": "**}}**", "1-1": "Marker for the end of an expression.", "3-0": "**var_1**", "3-1": "**var_1** First variable name to be searched for. Variable names can be composed of any letter from **a** to **z** and **A** to **Z**, any digit from **0** to **9** and the underscore char **_**", "4-0": "***var_2***", "4-1": "Variable name to be searched for if ***var_1*** is not defined", "5-0": "***workspace_1***", "5-1": "Workspace from which to retrieve ***var_3***", "6-0": "**.**", "6-1": "Delimiter between workspace name and variable name", "8-0": "**$**\"***any alternative text\"***", "8-1": "Alternative text if none of the variables are defined. Always the last element of the expression to be defined. Begins with:** $”** and end with: **“**", "7-0": "***var_3***", "7-1": "Variable name to be searched for, if ***var_2*** is not defined." }, "cols": 2, "rows": 9 } [/block] The variable expression is read as: Return ***var_1*** if defined. If ***var_1*** is not defined, return ***var_2*** if defined. If ***var_2*** is not defined, return ***var_3*** from ***workspace_1*** if defined. If ***var_3*** is not defined in ***workspace_1***, return the alternative text ***“any alternative text”***.