Item Text Chunk


item <integer1> [to <integer2>]
{of | in} <expression> the <ordinal> item {of | in} <expression>


The item text chunk yields a substring of an expression by extracting a specified item or range of items from the expression. Items are delimited by commas and include all punctuation between the delimiters, as well as returns. The expression can be any valid text string, including a container reference, a property reference, a function that returns text, a literal string, or a combination of these.


As with all chunk expressions, you can specify chunks of chunks, as in the following example: item 4 of line 1 of field "coordinates" You can also specify ranges of chunks, as in the following example: item 3 to 4 of the rectangle of button "ClickMe" You can use text chunk expressions with tabular chunk expressions by enclosing the tabular chunk expression in parentheses, as in the following example: put item 1 of (row 2 of pickList 3) Attention: You can use a combination of text and tabular chunk expressions to retrieve values, but not to insert values into containers.


The following list demonstrates various item text chunk expressions and the values they return. For the examples, assume these conditions: put "1,2,3,4,5" into my_variable put "I like peas, carrots, and broccoli" into field 1 Expression: item 1 of "red,green,blue" Result: red Expression: item 2 to 3 in "red,green,blue" Result: green,blue Expression: char 1 to 3 of item 2 of "red,green,blue" Result: gre Expression: item 1 to 4 of my_variable Result: 1,2,3,4 Expression: the last item in card field 1 Result: and broccoli Expression: the first item of cd fld 1
This text has been mechanically extracted from the Oracle Media Objects MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.