55.15 PLIST_EXISTS Function

Returns whether a key exists in the property list.

Syntax

APEX_STRING.PLIST_EXISTS (
    p_table IN apex_t_varchar2,
    p_key   IN VARCHAR2 )
    RETURN BOOLEAN;

Parameters

Parameter Description
p_table The input table.
p_key The input key.

Raises

NO_DATA_FOUND: Given key does not exist in table.

Example

The following example prints whether properties key1, key2 and key3 exist.

DECLARE
    l_plist apex_t_varchar2 := apex_t_varchar2('key1','foo','key2','bar');
BEGIN
    FOR i IN 1 .. 3 LOOP
        sys.dbms_output.put_line(
            'key'||i||': '||
            CASE apex_string.plist_exists(l_plist,'key'||i)
            WHEN true then 'TRUE'
            ELSE 'FALSE'
            END);
    END LOOP;
END;
-> key1:TRUE
   key2:TRUE
   key3:FALSE