<
From version < 3.4 >
edited by Outhman Moustaghfir
on 2024/01/30 15:04
To version < 2.1 >
edited by Outhman Moustaghfir
on 2024/01/30 15:01
>
Change comment: Uploaded new attachment "setvar.png", version {1}

Summary

Details

Page properties
Content
... ... @@ -2,8 +2,6 @@
2 2  
3 3  == Overview ==
4 4  
5 -[[image:setvar.png]]
6 -
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 ==
... ... @@ -10,8 +10,6 @@
10 10  
11 11  === JSON Format ===
12 12  
13 -[[image:Capture d'écran 2024-01-30 150237.png]]
14 -
15 15  The JSON file for SetVar has a simple structure. It consists of key-value pairs, where the keys represent variable names, and the values can be either static values or dynamic expressions.
16 16  
17 17  ==== Example 1: ====
... ... @@ -19,11 +19,12 @@
19 19  {{{
20 20   }}}
21 21  
22 -{{code language="json"}}
23 -{ "var1": "value1", "var2": "true" }
18 +{{code language="XML"}}
19 +SetVar(variable_name, value, global=False)
24 24  
25 25  {{/code}}
26 26  
23 +{ "var1": "value1", "var2": "true" }
27 27  
28 28  ==== Example 2: ====
29 29  
... ... @@ -30,10 +30,12 @@
30 30  {{{
31 31   }}}
32 32  
33 -{{code language="json"}}
34 -{ "var1": "value1", "var2": "${GetVar;inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2": "val2" } }
30 +{{code language="XML"}}
31 +SetVar(variable_name, value, global=False)
32 +
35 35  {{/code}}
36 36  
35 +{ "var1": "value1", "var2": "true", "inputFile1": "${GetVar;inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2": "val2" } }
37 37  
38 38  === Dynamic Values ===
39 39  
Capture d'écran 2024-01-30 150237.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.omoustaghfir
Size
... ... @@ -1,1 +1,0 @@
1 -14.9 KB
Content
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian