GenerateQueryRelativeURL

Mon 01 January 2018

Syntax

GenerateQueryRelativeURL(PORTAL.portalname, NODE.nodename, QueryName, IsPublic [, IsNewWindow])

Description

Use the GenerateQueryRelativeURL function to creates a URL string that represents a relative reference to the specified query on the portal servlet. The relative reference is suitable for use on any page that itself has the simple URL format.

If you want to generate an absolute URL, use either the GenerateQueryPortalURL or GenerateQueryContentURL function.

Parameters

Field or Control

Definition

portalname

Specify the name of the portal used for this request, prefixed with the reserved word PORTAL . You can also use a string, such as %Portal, for this value.

nodename

Specify the name of the node that contains the query, prefixed with the reserved word NODE . You can also use a string, such as %Node, for this value.

Queryname

Specify the name of the query you want to generate a URL for. This parameter takes a string value.

IsPublic

Specify whether the query is public or private. This parameter takes a Boolean value: True, the query is public, False otherwise.

IsNewWindow

Specify whether the URL is for a new browser instance. This parameter takes a Boolean value: True, the URL is for a new browser instance, False otherwise. The default is False.

If the value is True this function generates a new state block for use in a separate browser instance. This does not automatically open a new browser instance. It just supports it.

Note: When Query is being run on a PeopleTools version prior to 8.16, the query URL does not include the ability to specify if a query is public or private. On PeopleTools versions 8.16 and higher, the generated URL contains either the keyword PUBLIC or PRIVATE prepended to the query name. If you are building a URL for a portal node that is on a PeopleTools release prior to 8.16, you must remove the public or private keyword before trying to use the URL.

Returns

If IsPublic is specified as True, and the node has a Node Type of PIA, a string of the following format is returned:

../../../portal/node/q/?ICAction=ICQryNameURL=PUBLIC.QueryName

If IsPublic is specified as False, and the node has a Node Type of PIA, a string of the following format is returned:

../../../portal/node/q/q/?ICAction=ICQryNameURL=PRIVATE.QueryName

This function returns a Null string if you specify an invalid portal or node.