GenerateScriptRelativeURL

Mon 01 January 2018

Syntax

GenerateScriptRelativeURL(PORTAL.portalname, NODE.nodename, RECORD.recordname, FIELD.fieldname, event_name, function_name, [, keylist])

where keylist is a list of field references in the form:

[recordname.]field1 [, [recordname.]field2] ...

OR

&RecordObject1 [, &RecordObject2] ...

Description

Use the GenerateScriptRelativeURL function to create a relative URL string that represents a relative reference to the specified iScript. The relative reference is suitable for use on any page that has the simple URL format.

If you want to generate an absolute URL for an iScript, use either the GenerateScriptContentURL or GenerateScriptPortalURL 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 iScript, prefixed with the reserved word NODE . You can also use a string, such as %Node, for this value.

recordname

Specify the name of the record containing the iScript, prefixed with the reserved word RECORD .

fieldname

Specify the name of the field containing the iScript, prefixed with the reserved word FIELD .

event_name

Specify the name of the event containing the iScript. This is generally the FieldFormula event.

function_name

Specify the name of the iScript function.

keylist

An optional list of parameters used with the function. It can also be an already instantiated record object.

Returns

If the node has a Node Type of PIA, a string of the following format is returned:

../../../portal/node/s/recname.fieldname.event_name.function_name?parameters

If the node has a Node Type of ICType, a string of the following format is returned:

../../../portal/node/?ICType=Script&ICScriptProgramName=recname.fieldname.event_name.function_name?parameters

The question mark and the text following the question mark may or may not be included, depending on whether or not you specified a page and action or not.

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