Wiki

Scale Your Enterprise

User Tools

Site Tools


bw2:using_variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw2:using_variables [2021/07/19 16:53]
akoehler
bw2:using_variables [2023/12/19 09:02] (current)
wgates
Line 15: Line 15:
 ====== Variables Tool ====== ====== Variables Tool ======
  
-The **Variables** tool can be used in two ways. First, it can establish constant/static values to be used in the following workflow steps. Second, it can be used to capture values from previous workflow steps. The second option is not often used since values from previous steps can be referenced directly.+The **Variables** tool can establish constant/static values to be used in the following workflow steps.
  
 {{ :bw2:bizweavervartool1.png |}} {{ :bw2:bizweavervartool1.png |}}
Line 71: Line 71:
 {{ :bw2:bizweavervartool7.png |}} {{ :bw2:bizweavervartool7.png |}}
  
-The “SQLCommand_getData” step reads a list of data records. This list feeds into a loop.+The “SQLCommand” step reads a list of data records. This list feeds into a loop.
  
 <code> <code>
-Select  +SELECT 
-     (recordNumber-- This will be a record number from your table that you are using +     [recordNumber-- This will be a record number from your table that you are using 
-From +FROM 
-    (your table) -- table you are pulling the recordNumber from+    [yourTable] -- table you are pulling the recordNumber from
 </code> </code>
  
Line 92: Line 92:
 {{ :bw2:bizweavervartool9.png |}} {{ :bw2:bizweavervartool9.png |}}
  
-This type of processing could be used in conjunction with a **//[[bw2:decision_tool#Decision Tool|Decision Tool]]//** such that processing would go in one direction or another based on the number of records found. 
  
 ====== Step Variables ====== ====== Step Variables ======
Line 104: Line 103:
 The step named “SQL Command_getData” uses the SQL statement: The step named “SQL Command_getData” uses the SQL statement:
  
-<code sql>select +<code sql>SELECT CardCode,  
-t0.CardCode, t0.CardName, t0.CardType +   CardName,  
-from OCRD t0+   CardType 
 +FROM OCRD
 </code> </code>
  
 This produces a list of records that feeds into the loop “Loop_ProcessRecords.” The step variable created for “CardCode” is: This produces a list of records that feeds into the loop “Loop_ProcessRecords.” The step variable created for “CardCode” is:
  
-<code>WorkFlow(SQLCommand_getData).Get({FIELD_CardCode})</code>+<code>WorkFlow(SQLCommand).Get({FIELD_CardCode})</code>
  
 This step variable is used in the FileWriter_VariableTest step. This step variable is used in the FileWriter_VariableTest step.
Line 195: Line 195:
     * Only one of these can be selected at once, and they only apply in the step in which they are enabled.     * Only one of these can be selected at once, and they only apply in the step in which they are enabled.
     * **JSON:** Selecting this will escape reserved characters for a JSON file. See the table below for more information.     * **JSON:** Selecting this will escape reserved characters for a JSON file. See the table below for more information.
-      * This will generally be used in a Databuilder step  
     * **XML:** Selecting this will escape any reserved characters for an XML file. See the table below for more information.     * **XML:** Selecting this will escape any reserved characters for an XML file. See the table below for more information.
-      * This will generally be used in a Databuilder step 
     * **SQL:** Selecting this will escape reserved characters for SQL Server see table below for more information     * **SQL:** Selecting this will escape reserved characters for SQL Server see table below for more information
   * **Replace empty values with NULL:** This will take any empty strings or blanks ex '' and replace it with NULL   * **Replace empty values with NULL:** This will take any empty strings or blanks ex '' and replace it with NULL
bw2/using_variables.1626728013.txt.gz · Last modified: 2021/07/19 16:53 by akoehler