EncodeURLForQueryString

Mon 01 January 2018

Syntax

EncodeURLForQueryString(URLString)

Description

Use the EncodeURLForQueryString function to encode URLString for use in a query string parameter in an URL. All characters outside the Unicode Basic Latin block (U+0020 — U+007F) are encoded, with the exception of the characters in the table below which are not encoded as they are typically valid in a query string.

If the link is constructed in a page, and the value is a link field, you should not call EncodeURL to encode the entire URL, as the PeopleSoft Pure Internet Architecture does this for you. You still need to unencode the parameter value when you retrieve it, however.

Always encode each field value being added directly to query strings using EncodeURLForQueryString.

The following table lists punctuation characters in the Unicode Basic Latin block that are not encoded by the URLEncodeForQueryString function.

Punctuation Character

Description

(

Left parenthesis

)

Right parenthesis

*

Asterisk

-

Hyphen, minus

.

Full stop, period

_

Underscore, low line

Parameters

Field or Control

Definition

URLString

Specify the string you want encoded. This parameter takes a string value.

Returns

An encoded URL string.