Skip to end of metadata
Go to start of metadata

Using Variables from Actions Library, you can assign the following values to Recorder variables:

  • Random value
  • Constant value
  • Expression result
  • Number format
  • Date format
Actions LibraryActions Description

How to Use Variables

A variable should be added to Actions Flow, where you can bind it to one of the Recorder Variables and set its value and other properties. 

The types of Actions Library Variables correspond to the types of Recorder Variables. Recorder Variables should be declared before binding to Actions Library Variables. Mind to refer to List of Reserved Words when defining variables.

Random Value

The Random Value action is used to generate a value at random according to the predefined mask. Specify the following properties.

  • Variable – a Recorder Variable which gets the value from the Random Value variable. The type of the value is the same as the type of the respective Recorder Variable declared in Recorder Variables list.
  • Randomize options – the rules to generate the random value. The rules are specific for each type of variables.

String


A random text is generated according to the following patterns:

  • String length – the length of the generated value
  • Character set – the list of characters to be used to generate the value:
    • alpha – the value contains alphabetical characters only
    • numeric – the value contains numeric characters only
    • alpha-numeric – both alphabetic and numerical characters are used to generate the value

Date


A random date is picked up from the time span between the first and last dates defined as:

    • from – the first date for the time span
    • to – the last date for the time span

Number


A random number is generated according to the following patterns:

  • Pick a number between – the range to take the number from
  • Number type
    • integer – only integer numbers are used
    • decimal – the number contains a decimal part

Table


A random table is generated according to the following pattern.

  • Table dimensions
    • Rows – number of rows in the table
    • Columns – number of columns in the table
  • Character set – the list of characters to be used to generate the content for table cells:
    • alpha – the value will contain alphabetical characters only
    • numeric – the value will contain numeric characters only
    • alpha-numeric – both alphabetic and numerical characters are used to generate the value

List


A random list generated according to the following pattern.

  • Create a random list with length – the maximum number of items in the list
  • Character set – the list of characters to be used to generate the list items:
    • alpha – the value will contain alphabetical characters only
    • numeric – the value will contain numeric characters only
    • alpha-numeric – both alphabetic and numerical characters are used to generate the value

Boolean

true or false is written by random (no preselection is possible).

Constant Value

The Constant Value action is used to assign a constant value to the Recorder Variable. Specify the following properties.

  • Variable – a Recorder Variable which gets the value from Constant Value. The value type is the same as the type of the Recorder Variable which the Action Variable is bound to.
  • Value – the value to be assigned. The value corresponds to the type of the Recorder Variable where the value is set to.

Number

  • Set value – enter the constant number value

String

  • Set value – enter the string constant value

Date

  • Fixed – a date is selected by the user
  • Current date – the current date is set automatically during playback

Table

  • Modify table – click the button to create/modify the table, define the number of rows and columns, and enter the content into the cells

List


  • Modify list – click the button to create/modify the list and add/delete elements to/from the list

Boolean

  • Set value – select true or false

Expression Value

The Expression Value action has three functions, depending on the type of the assigned variable:

  • with a variable of Number type, it computes a value from operations with a number of the Recorder variables
  • with a variable of List type, it appends a text or content from another list to the list, or gets the list size and saves it to a numeric variable
  • with a variable of Table type, it appends a content of a list to the table either as a row or a column, or gets the number of table rows or columns and saves the size to the respective numeric variable

Number Variable

  • Variable – a Recorder Variable which gets the value computed in the expression

  • Expression – a sequence of operators and variables that performs a combination of the actions to compute a value

    Attention

    A variable for expression has the following syntax: ${variableName}, where variableName is a Recorder Variable name.

The following expressions are supported:

  • * – multiplication
  • / – division
  • + – sum
  • - – subtraction
  • % – remainder after division (for example, 13%6 =1)
  • () – precedence of operators

List Variable

  • Push (append) – the content from a List or String variable is appended to the List variable assigned to the action

  • Get size – the length of the list is calculated and saved to a Number variable

Table Variable

  • Push (append) – the content from a List variable is appended to the Table variable assigned to the action as a row or a column

  • Get size – the number of rows or columns in the table is calculated and saved to a Number variable

Number Format

The Number Format action enables conversions of number values to/from string values. Select one of the available options. 

  • Reformat string  – extracts a number value in a predefined format from a string variable, applies another format to the extracted number value, and saves the result to a string variable
  • Convert number to string – converts a number variable value to a string value using a predefined format and saves the result to a string variable
  • Convert string to number – converts a string variable value to a number value using a predefined format and saves the result to a number variable

Reformat String

Reformat String is used to change the format of the number value containing in a string.

  • Input – a String value or a Recorder Variable of String type containing a value

    • Input string – a string value defined either explicitly or as a Recorder Variable to extract the numerical part from according to the predefined format

    • Format – a format that applies a mask to extract the Number from the string value; can be selected from Presets or user-defined
    • Show Presets – opens a list of preset formats used to parse the value from the Input string
    • Locale – regional settings that define the decimal symbol. The selected locale is applied to both the preset and the custom formats

    Attention

    The decimal symbol in the Input string should match with that one defined by Locale. The characters, which do not match the format defined, are skipped starting from the first such character found.

  • Ouput – a Recorder Variable of String type to save the resulting value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting string value to

    • Format – a format to be applied to the resulting string value. The format can be selected from Presets or user-defined
    • Show presets – opens a list of preset formats to be applied to the resulting string value
    • Locale – regional settings that define the decimal and digit grouping symbols. The selected locale is applied to both the preset and the custom formats
 Example

Input

Input string:

123,456,789ABC

Format:

#,##0

Locale:

English (United States)

Output

Format:

0

Resulting value

123456789

Convert Number to String

Convert Number to String is used to convert a number value to a string value in a defined format.

  • Input – a Recorder Variable of Number type containing a number value to be converted to a string

    • Select variable – a dropdown to choose a Recorder Variable with a number value to be converted
  • Ouput – a Recorder Variable of String type to save the converted value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting string value to

    • Format – a format to be applied to the resulting string value. The format can be selected from Presets or user-defined
    • Show presets – opens a list of preset formats to be applied to the resulting string value
    • Locale – regional settings that define the decimal and digit grouping symbols.The selected locale is applied to both the preset and the custom formats
 Example

Input

Number:

125477896.7

Output

Format:

#,##0.00

Locale:

English (United States)

Resulting value

125,477,896.70

Convert String to Number

Convert String to Number is used to extract a number value in a defined format from a string and save it to a Number variable to process further as a number value.

  • Input – a string value to be converted to a number

    • Input string – a string value defined either explicitly or as a Recorder Variable to extract the numerical part from according to the predefined format

    • Format – a format that applies a mask to extract the Number from the string value. The format can be selected from Presets or user-defined
    • Show Presets – opens a list of preset formats defining how to parse the value from the Input string
    • Locale – regional settings that define the decimal symbol. The selected locale is applied to both the preset and the custom formats

      Attention

      The decimal symbol in the Input string should match with that one defined by Locale. The characters, which do not match the format defined, are skipped starting from the first such character found.

  • Ouput – a Recorder Variable of Number type to save the converted value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting number value to

 Expand

Input

String:

125,477,896.70 USD

Format:

#,##0

Locale:

English (United States)

Resulting value

125477896.70

Date Format

The Date Format action enables conversions of dates and time, using different formats. Select one of the available options. 

  • Reformat string – extracts a date or/and time in a predefined format from a string variable, applies another format to the extracted date/time, and saves the result to a string variable
  • Convert date to string – converts a DateTime variable value to a string value using a predefined format and saves the result to a string variable
  • Convert string to date – converts a string variable value to a date/time value using a predefined format and saves the result to a DateTime variable

Tip

You can use your own format preset in the Date Format action entering it manually.

Reformat String

The Reformat String option helps changing the format of the date/time value containing in a string.

  • Input – a String value or a Recorder Variable of String type containing a value

    • Input string – a string value defined either explicitly or as a Recorder Variable to extract the date from according to the predefined format

    • Format – a format that applies a mask to extract the date from the string value. The format can be selected from Presets or user-defined
    • Show Presets – opens a list of preset formats defining how to parse the value from the Input string

    • Locale – regional settings that define the short and long date format and the time format. The selected locale is applied to both the preset and the custom formats

    Attention

    The the date and time formats including separators in the Input string should match with that one defined by Locale.

  • Ouput – a Recorder Variable of String type to save the resulting value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting string value to

    • Format – a format to be applied to the resulting string value. The format can be selected from Presets or user-defined
    • Show presets – opens a list of preset formats to be applied to the resulting string value
    • Locale – regional settings that define the short and long date format and the time format. The selected locale is applied to both the preset and the custom formats
 Example

Input

Input string:

30/01/18

Format:

dd/MM/yy

Locale:

English (United States)

Output

Format:

yyyy-MM-dd

Resulting value

2018-01-15

Convert Date to String

Convert Date to String is used to change the format of the date/time to the required directly without any other actions such as Text or applications like Notepad. For example, when the date is used in file names, but the separator (/) is not the proper one.

  • Input – a Recorder Variable of DateTime type containing a date/time value to be converted to a string

    Attention

    The date and time formats in the Recorder Variable are defined in the regional settings of the operating system.

    • Select variable – a dropdown to choose a Recorder Variable with a number value to be converted
  • Ouput – a Recorder Variable of String type to save the converted value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting string value to

    • Format – a format to be applied to the resulting string value. The format can be selected from Presets or user-defined
    • Show presets – opens a list of preset formats to be applied to the resulting string value
    • Locale – regional settings that define the short and long date format and the time format.nThe selected locale is applied to both the preset and the custom formats
 Example

Input

Date:

2018-Jan-30 15:00:00 (CET)

Output

Format:

EEEE, dd MMMM, yyy, HH:mm:ss

Locale:

Chinese (China)

Resulting value

星期二, 30 一月, 2018, 15:00:00

Convert String to Date

Convert String to Date is used to change the format of the date/time acquired from other applications or files to correspond to the format, which is set up on the machine where Express Edition runs.

  • Input – a string value to be converted to a date/time

    • Input string – a string value defined either explicitly or as a Recorder Variable to extract the date/time from according to the predefined format

    • Format – a format that applies a mask to extract the date/time from the string value. The format can be selected from Presets or user-defined
    • Show Presets – opens a list of preset formats defining how to parse the value from the Input string
    • Locale – regional settings that define the short and long date format and the time format. The selected locale is applied to both the preset and the custom formats

      Attention

      The date and time formats including separators in the Input string should match with that one defined by Locale.

  • Ouput – a Recorder Variable of DateTime type to save the converted value

    • Select variable – a dropdown to choose a Recorder Variable to save the resulting number value to

 Example

Input

String:

22/01 14:51

Format:

dd/MM HH:mm

Locale:

English (United States)

Resulting value

2018-01-22T14:51:00+03:00[CET]

Attention

The date and time formats in Recorder Variable are defined in the regional settings of the operating system.

  • No labels