BUILTIN.CF
This function returns the criteria value of a field in a query. Some fields, such as transaction.status
, use different SQL expressions to retrieve a value based on the defined context, similarly to composite keys. You should use this function when creating conditions on fields with combined values.
The following query returns a transaction status without the combined field value. An example output could return 'B'
to represent a paid in full transaction.
SELECT status FROM TRANSACTION
The following query uses the BUILTIN.CF
function to return a transaction status with the combined field value. The result is a key value pair to represent the transaction type and status. An example output could return 'CustInv: B'
to represent a paid in full invoice transaction.
SELECT BUILTIN.CF(status) FROM TRANSACTION
You must use this function on queries that use filters with composite key value fields to avoid potential result errors. See the syntax section below for an example of a filtered query on composite key value fields.
Parameters
Parameter |
Required / Optional |
Description |
Acceptable Parameter Values |
---|---|---|---|
Field name |
Required |
The name of the field to return combine field values. |
– |
Syntax
SELECT BUILTIN.CF(transaction.status) FROM Transaction
SELECT status FROM Transaction WHERE BUILTIN.CF(status) = 'Opprtnty:A'