This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw:using_variables [2019/10/23 12:01] akoehler [Calculations in Variables] |
bw:using_variables [2019/10/23 14:46] (current) |
||
|---|---|---|---|
| Line 62: | Line 62: | ||
| A common use of this functionality is to maintain a counter to control processing or document processing. The calculation will typically be placed inside of a loop construct. | A common use of this functionality is to maintain a counter to control processing or document processing. The calculation will typically be placed inside of a loop construct. | ||
| + | ====Example 3===== | ||
| Following is a simple example of how a “counter” calculation is defined. In this case we want to know how many records were passed into a loop from a SQLCommand step. for this example we will use a simple statement. | Following is a simple example of how a “counter” calculation is defined. In this case we want to know how many records were passed into a loop from a SQLCommand step. for this example we will use a simple statement. | ||
| Line 124: | Line 125: | ||
| The following image illustrates how variables are selected. This process is used in all instances where some variable needs to be referenced. The list of available workflow steps will get larger as you progress through additional steps in the workflow. | The following image illustrates how variables are selected. This process is used in all instances where some variable needs to be referenced. The list of available workflow steps will get larger as you progress through additional steps in the workflow. | ||
| - | {{: | + | {{ : |
| - Position the cursor in the field where the variable is needed. | - Position the cursor in the field where the variable is needed. | ||
| Line 135: | Line 136: | ||
| <WRAP left round tip> | <WRAP left round tip> | ||
| - | When variables are used, they have a very specific name structure, as shown in the “TimeStamp” example | + | When variables are used, they have a very specific name structure, as shown in the **// |
| </ | </ | ||
| Line 145: | Line 146: | ||
| ===== User Variable Example ===== | ===== User Variable Example ===== | ||
| - | In the step marked “3” | + | In a Bizweaver workflow a user can reference variables that are initiated earlier |
| - | {{: | + | The below workflow when processed will now only pull the CardType of " |
| + | |||
| + | {{ : | ||
| + | |||
| + | In the variables tool there is a **User Defined Variable ** of " | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | In the SQL tool step you can reference the **User Defined Variable** of " | ||
| + | |||
| + | {{ : | ||
| So, the SQL statement now uses the value ‘C’ in the variable “UserVariable1.” | So, the SQL statement now uses the value ‘C’ in the variable “UserVariable1.” | ||
| - | {{: | + | {{ : |
| Since the variable value ‘C’ is a string (text), the variable name must be enclosed in single quotes as required by SQL. | Since the variable value ‘C’ is a string (text), the variable name must be enclosed in single quotes as required by SQL. | ||
| Line 157: | Line 168: | ||
| ===== Step Variable Example ===== | ===== Step Variable Example ===== | ||
| - | In the step marked “4” in the illustration above we are writing the output of the SQL step to a file. | + | In this example |
| + | |||
| + | Below is the workflow we are using for the example. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Note the fields in the SQL statement that will be referenced later. | ||
| + | |||
| + | {{ : | ||
| - | {{: | + | Next when going to the file writer step you will press [F4] and select the variables from the SQL step. |
| - | In this step, we make use of both Step and User variable type. | + | {{ : |
| - | To make the file name unique | + | You can see each step variable in the " |
| - | {{:bw:varimage10.png?479x232}} | + | {{ :bw:varimage9.png?482x384 |
| - | C: | ||
| - | The values in the body section of the file (the actual data records) are step variables that come from the previous SQL Command step (3). | ||
| - | {{: | ||