Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Arrays in Columns

You can create columns that use arrays, including nested (that is, contained or referenced) concept arrays and properties.

The following figure displays the decision table that uses arrays in columns:

## Defining Columns

You can drag and drop any level of nested (contained or referenced) concept arrays, and properties of such arrays, to the Conditions or Actions areas to create a named column. You can specify the array index against which to check a value (condition), or to set a value (action).

For example, suppose a concept A has a property B which is an array of contained concept B, and concept B has a property `intProp`. If you drag `intProp` into the decision table to create a column, the new column name is as follows: `a.b[].intProp`

## Specifying Values

When the expression in the column name contains the access to a position within an array (as in the example `a.b[].intProp`), then you can specify which position must be used in the cell of a table row.

To specify the position, enclose the position index within square brackets, followed by the value. For example, to specify a value of 100 for a specified index in a cell, you might enter the following:

    [0]100

For an action, this is the equivalent of specifying the following: `a.b[0].intProp = 100`. For a condition it would be: `a.b[0].intProp == 100`.

## Omitting the Array Index

If you omit the array index and simply set the cell to a value such as `100`, by default the array component’s last element is used. This would be the equivalent of specifying `a.b[a.b@length - 1] = 100` for an action, and `a.b[a.b@length - 1] == 100` for a condition.

Note:

- To avoid ambiguity you must specify the array index in the following cases:
  - Multiple loop indexes
  - String expressions
- If you omit the array index and no value is present at the last element, an exception results. It is recommended that you specify the index, and ensure that all indexes specified have values.

## Using Function Evaluations

You can also specify index values using a function evaluation, for example:

    [Number.intValue("0",10)]10

## Using Multiple Loop Indexes

If multiple loop indexes are involved, as in the case of nested concepts, use the colon character (`:`) as the delimiter for indexes. Always specify the index, to avoid ambiguity. For example, given this nested concept situation:

    a.b[].c[].d[].intProp

You can also specify a condition cell value as follows:

    [0:1:System.getGlobalVariableAsInt("GlobalVariableName")]>=100

Which is the equivalent of the following:

    a.b[0].c[1].d[System.getGlobalVariableAsInt("GlobalVariableName")] >= 100

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.