| get_value_as_string function

Related topics
Contained in package wwpre_api_value. Call this function to get the preference value as a type-specific string. Notes: This function returns the value of the preference as a text string. It gets the text string by calling the preference's type handling object to convert the value from its native form into string form. For details about returning preference values, see About preference values. function get_value_as_string ( p_path in varchar2, p_name in varchar2, p_level_type in varchar2 default INHERIT_LEVEL_TYPE, p_level_name in varchar2 default null, p_language in varchar2 ) return string;

Version: Oracle Portal 3.0.6.6.5 or later
Parameters:
p_path | The path for the preference name. Datatype: in varchar2
p_name | The preference name. Datatype: in varchar2
p_level_type | A constant value for the level at which the value is retrieved. Note: If a value is not specified for p_level_type, this function attempts to inherit the value, moving to each step if a value is not found: Get the value for the user currently logged in. Get the default group value for the user currently logged in. Get the value for the system level type. Return null if no value is found. Datatype: in varchar2 Default: INHERIT_LEVEL_TYPE
p_level_name | The user name or group name for the value to be retrieved. Notes: If not specified, this method searches for a valid value based on path, name, and level type. For user-level or group-level type, the level name or level ID must be specified. Datatype: in varchar2 Default: null
p_language | The language to load the type for the preference value. Datatype: in varchar2
Returns: This function returns the string value of a specified preference. It returns null if there is no value or if the preference name was not found. Exceptions: If the type specified for the value is invalid, a VALUE_ERROR_EXCEPTION is raised. If the path is not found, a PATH_NOT_FOUND_EXCEPTION is raised. If a duplicate path is found, a DUPLICATE_PATH_EXCEPTION is raised. If the value has not been stored, a GENERAL_PREFERENCE_EXCEPTION is raised. Example: This example gets the value based on the inherit mechanism. l_varchar2_value := wwpre_api_value.get_value_as_string ( p_path => 'ORACLE.PORTAL.TEST.STYLE.DEFAULT', p_name => 'FONT_COLOR', p_level_type => wwpre_api_value.USER_LEVEL_TYPE, p_level_name => 'TEST_GROUP', p_language => wwctx_api.get_nls_language );

Related topics
Preference API package | PDK PL/SQL API Reference - Home

Back to top
The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio