getPreferenceValues()

Returns an array of strings that are associated with a given preference key. If no preference values are associated with the key, or the backing preference store is not available, it returns the specified default value.

This function produces an error if the given key has a null value.

Syntax

portalLib.getPreferenceValues(
  key STRING in,
  defaultValue STRING[] in)
returns (value STRING[])
key
A string value that indicates the name of the preference to be retrieved.
defaultValue
A string array that is used as a default set of values if the preference cannot be retrieved. This value may be null.
value
A string array that contains the values of the requested preference.

Example

preference String?;
preference = portalLib.getPreferenceValues("username", null);

Feedback