GetURL function

Syntax

GetURL(URL.URLIdentifier)

Description

Use the GetURL function to return the URL, as a string, for the specified URLIdentifier. The URLIdentifier must exist and been created using URL Maintenance.

Note:

If the URL identifier contains spaces, you must use quotation marks around URLIdentifier. For example, GetURL(URL."My URL");

If a language-specific URL exists for the user's current session language, and the user is not calling GetURL from a batch program, it is returned. Otherwise, the base language version of the URL is returned.

When GetURL is called from an application engine program, the URL is retrieved either from the base URL table or the related language table depending on the language code. The language code is provided by the User Profile for the user that executed the application engine program. The language code does not come from the language that the user specified when logging into the system.

Parameters

Parameter Description

URLIdentifier

Specify a URL Identifier for a URL that already exists and was created using the URL Maintenance page.

Returns

A string containing the URL value for that URL Identifier, using the user's language preference.

Example

Suppose you have a URL with the identifier PEOPLESOFT, and the following URL:

http://www.example.com

From the following code example

&PS_URL = GetURL(URL.PEOPLESOFT);

&PS_URL has the following value:

http://www.example.com

Suppose you have the following URL stored in the URL Maintenance, with the name QE_CALL:

/S/WEBLIB_QE_MCD.QE_MCD_MAIN.FieldFormula.iScript_Call

You could combine this in the following code to produce an HTML string used as part of a response:

&output = GetHTMLText(HTML.QE_PHONELIST, %Request.RequestURI | "?" | 
GetURL(URL.QE_CALL));