get_sessionparameter (p)

The get_sessionparameter(p) function returns the value of session parameter x if it has a value; otherwise, the functions return an empty string.

The session parameter x must previously have been set in a script associated with the same session that the current script is associated with, either by means of the command SetSessionParameter or by means of the function set_sessionparameter.

For more information on sessions, see KCM Core sessions.

This function returns a value of type Text.

Examples

SetSessionParameter
  Par ("plugh")
  Value ("plover");
Var Text X = get_sessionparameter ("plugh");     
Var Text Y = get_sessionparameter ("notplugh");  

Result: "plover" and ""

Remarks

This function throws an error when the current script is not associated with a session. If KCM Core has been instructed to ignore errors using the command OnError Script(*), and an error occurs, the function returns "", and the _error constant is set to True.

Session parameters with names that begin with _itp or ITP are reserved for internal use in KCM products.