Changes for page SetVar
Last modified by Outhman Moustaghfir on 2024/09/27 13:43
<
>
edited by Outhman Moustaghfir
on 2024/01/30 15:04
on 2024/01/30 15:04
edited by Outhman Moustaghfir
on 2024/01/30 17:09
on 2024/01/30 17:09
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4,6 +4,7 @@ 4 4 5 5 [[image:setvar.png]] 6 6 7 + 7 7 The SetVar connector is designed to set variables within a scenario by utilizing a JSON file. This connector allows users to define variables and even use dynamic values using expressions. 8 8 9 9 == Usage == ... ... @@ -20,7 +20,7 @@ 20 20 }}} 21 21 22 22 {{code language="json"}} 23 -{ "var1": "value1", "var2": " true" }24 +{ "var1": "value1", "var2": "value2" } 24 24 25 25 {{/code}} 26 26 ... ... @@ -31,13 +31,13 @@ 31 31 }}} 32 32 33 33 {{code language="json"}} 34 -{ "var1": "value1", "var2": "${GetVar; inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2":"val2"}}35 +{ "var1": "value1", "var2": "${Env.GetVar;variableName}" } 35 35 {{/code}} 36 36 37 37 38 38 === Dynamic Values === 39 39 40 -SetVar supports dynamic values using expressionsin the ${GetVar;variableName}format. This allows you to reference the values of other variables within the JSON file.41 +SetVar supports dynamic values using iXPath functions (GetVar, Date, GetTracking...). This allows you to reference the values of other variables within the JSON file. 41 41 42 42 == Examples == 43 43 ... ... @@ -51,11 +51,11 @@ 51 51 {{/code}} 52 52 53 53 54 -=== Using Dynamic Values === 55 +=== Using Dynamic Values by GetVar function === 55 55 56 56 57 57 {{code language="json"}} 58 -{ " var1": "value1", "var2": "${GetVar;inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2": "val2"}}59 +{ "username": "john_doe", "email": "${Env.GetVar;Email}", "isAdmin": "false"} 59 59 {{/code}} 60 60 61 61 ... ... @@ -62,7 +62,7 @@ 62 62 == Important Notes == 63 63 64 64 * Variables set by SetVar can be referenced within the same JSON file or in subsequent scenarios. 65 -* Ensure proper syntax for dynamic values using ${GetVar;variableName}.66 +* Ensure proper syntax for dynamic values using **iXPath functions**. 66 66 67 67 == Conclusion == 68 68