Get Array Data

Obtain specific information from a variable containing a string of items (an "array"). You can choose to obtain the following types of information:

  • The value of a specific item in the array

  • The total number of items in the array

  • The result of a mathematical calculation performed on the array:

    • Average

    • Maximum Value

    • Minimum Value

    • Sum

In order for this command to work properly, all the items in the variable must be delimited (i.e., separated) in a consistent way.

  1. Enter the name of the variable from which you want to obtain data

  2. Enter the delimiter or the characters that appear before and after each item in the array

  3. Choose the type of data you want to obtain. For a mathematical calculation, select the operation.

  4. Enter the name of the variable into which you'd like to place the data obtained

  5. Instruct the wizard how to handle any errors encountered. Read more about error handling.

In order to perform a mathematical calculation, all values in the array must be numeric. If one or more of the values in the array is non-numeric, the wizard will return an empty result in the variable you have specified. (Note that numbers including currency symbols are treated as non-numeric.)

You can use the Check Type command to validate that variable values are numeric prior to using them in mathematical calculations.

Example

Let's say you run an e-commerce internet website. At the end of each day, you read the amounts of all the day's orders into a variable called daily orders. You'd like to extract the following information: (1) total number of orders; (2) average order amount; and (3) largest order amount.

daily orders = 65.00; 189.95; 645.76; 39.05; 254.36; 98.89; 369.56

Result: number of orders = 7

Result: average order = 237.51

Result: largest order = 645.76