TeleFlow Step 0320

TeleFlow Step 0320

From TeleFlow

Jump to: navigation, search

Image:Iv_320.gif Math Step
Performs numeric calculations or string manipulations.

Note: Many of the operations that can be done with the Math step can also be done with the Run Basic Script step. The Run Basic Script has the advantage of being able to perform multiple operations in one step, in addition to being able to run scripts containing loops and conditional code.

Contents

Properties

Variable to receive result: The variable that will be created or modified by the result of the calculations or manipulations. e.g.: @TOTAL

Base value: The first variable or value to use in conjunction with the second variable or value to determine the result of the calculation. e.g.: 49 or @APPLES

Function: The operation to perform on the Base value and (optionally, depending on the function) Modifying value. Possible operations to perform on these values:

  • + (Addition: Base value + Modifying value)
  • - (Subtract: Base value - Modifying value)
  • * (Multiply: Base value x Modifying value)
  • / (Divide: Base value / Modifying value )
  • Modulus of... (Base value Mod Modifying value)
  • String append... (Append Modifying value to Base value)
  • String length of... (String length of Base value)
  • Copy string from... (Copy Base value starting at character number Modifying value for Number of characters to copy)


Modifying value: The second variable or value to use in conjunction with the first variable or value to determine the result. e.g.: 51 or @ORANGES

Number of characters to copy: If the function is marked as a "Copy string from" operation, then a value must be entered in the field. This entry determines how many characters will be cut to the right of the Modifying value position in the Base value string. e.g.: 5 or @CUTLENGTH

Examples

Here are some full examples of entries that the Math step can be used for:

  • @total = 49 + 51
  • @total = @apples - @oranges
  • @NEWSTRING = 'GOOD INFORMATION' Copy string from... 6 ...for... 3 (Result = 'INF')
  • @area = @width * @length


Action Steps

None.

Related Steps

Image:iv_517.gif Run Basic Script
Image:Iv_300.gif Set Global Variable
Image:Iv_305.gif Set Local Variable