Application Integration
- Application Integration
- All Products
util:decode(value, search1, result1, args, default)
Argument
| Required/
Optional
| Description
|
---|---|---|
value
| Required
| Passes the values that you want to search.
You can enter any valid transformation expression. You can pass any data type except Binary.
To pass a NULL value, you must specify an empty sequence in the following format:
()
|
search1
| Required
| Passes the values for which you want to search.
You can enter any valid transformation expression. You can pass any value with the same data type as the value argument. The search value must match the value argument. You cannot search for a portion of a value. Also, the search value is case sensitive.
For example, if you want to search for the string 'Halogen Flashlight' in a particular column, you must enter 'Halogen Flashlight, not just 'Halogen'. If you enter 'Halogen', the search does not find a matching value.
To pass a NULL value, you must specify an empty sequence in the following format:
()
|
result1
| Required
| The value that you want to return if the search finds a matching value.
You can enter any valid transformation expression and pass any data type except Binary.
To pass a NULL value, you must specify an empty sequence in the following format:
()
|
args
| Required
| Pairs of search values and result values separated by a comma.
For example, use the following syntax:
util:decode(value, search1, result1, search2, result2, searchn, resultn, default)
To pass a NULL value, you must specify an empty sequence in the following format:
()
|
default
| Required
| The value that you want to return if the search does not find a matching value.
You can enter any valid transformation expression and pass any data type except Binary.
To pass a NULL value, you must specify an empty sequence in the following format:
()
|
util:decode( CONST_NAME 'Five', 5, 'Pythagoras', 1.414213562, 'Archimedes', 3.141592654, 'Pi', 3.141592654 )
util:decode( CONST_NAME 'Five', 5, 'Pythagoras', '1.414213562', 'Archimedes', '3.141592654', 'Pi', 3.141592654 )
Function cannot resolve operands of ambiguously mismatching datatypes.
util:decode( ITEM_ID, 10, 'Flashlight', 14, 'Regulator', 20, 'Knife', 40, 'Tank', 'NONE' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
util:decode( TRUE, Var1 = 22, 'Variable 1 was 22!', Var2 = 49, 'Variable 2 was 49!', Var1 < 23, 'Variable 1 was less than 23.', Var2 > 30, 'Variable 2 was more than 30.', 'Variables were out of desired ranges.')
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|