URLParam

Extracts and decodes the value of a parameter from a URL’s query string.

Variants

URLParam(Text url, Text param)

Extracts and decodes the value of the parameter specified by name from the URL’s query string.

Parameters

url
The URL string from which to extract the parameter.
param
The parameter name to extract from the URL’s query string.

Returns

Text

Remarks

If there is no such parameter, null is returned. If there are multiple parameters with the same name, their values are concatenated into a comma-separated string.

Examples

URLParam(Text url, Text param, Numeric index)

Extracts and decodes the value of the parameter specified by name and 1-based index from the URL’s query string.

Parameters

url
The URL string from which to extract the parameter.
param
The parameter name to extract from the URL’s query string.
index
The numeric index of the parameter in the URL’s query string. The first parameter starting on the left is index 1.

Returns

Text

Remarks

This function helps when dealing with identically named parameters.

Examples