Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference SEARCHUP
Functions and Expressions Reference Guide
178
SEARCHUP
The SEARCHUP function performs a binary search on a series sorted in ASCII
ascending order, returning a related object that corresponds to the item found.
Syntax
SEARCHUP (series-object-expression, series-item-object-
expression, single-item-expression)
Meaning
SEARCHUP (corresponding_object_to_return,
ascending_items_to_search, item_to_match)
Returns
This function returns a single-object.
Performs a binary search on the item series of ascending_items_to_search.
The ascending_items_to_search must be sorted in ASCII ascending order. The
value to search for is specified as the item_to_match and must be of the same
type as the ascending_item_to_search. The object returned
(corresponding_object_to_return) must be related to
ascending_items_to_search by a common object name.
If no match is found,
SEARCHUP returns NONE.
Examples
SEARCHUP (Age Column:Row:DBSelect, SSN Column:Row:DBSelect,
SSN_Value:Message)
If there are ten Rows in DBSelect, the search starts by comparing the first
SSN Column of the fifth Row with the SSN_Value in Message. If the result
matches,
SEARCHUP returns the first Age Column of that Row. If the value of
SSN Column is greater than the SSN_Value in Message, the search
continues with the third Row. If the value of SSN Column is less than the
SSN_Value in Message, the search continues with the seventh Row in
DBSelect. The search continues in this fashion until either a match is found or
until one Row is selected. If there is more than one SSN Column for the
selected Row, a similar search is initiated for all SSN Column’s for the
selected Row in DBSelect.
SEARCHUP returns the first Age Column for the selected Row of DBSelect.