AddTrackingURL method: Query class
Syntax
AddTrackingURL(URLString)
Description
Use this method to define the base URL used to construct a fully qualified drilling URL. A base URL consists of the following elements:
http://server_name/servlet_name/site_name/portal_name/node_name
For example:
http://example.com:8080/psp/ps_2/EMPLOYEE/EMP_LOCAL
Because a base URL can be set or derived in several ways, the use of AddTrackingURL is required only when the calling program does not have current context to identify the site, portal, and node and the elements of the base URL (portal name, node name, and content type) were not defined when the drilling URL was defined. Specifically, the base URL can be set or derived as follows:
-
The portal name, node name, and content type can be defined as optional elements of the query drilling URL definition.
-
The portal name, node name, and content type can be derived from the current context (that is, from the URL of the logged in user who is executing the query).
-
Finally, these elements can be defined programmatically through AddTrackingURL. If either of the first two bullets is true, then the value specified by AddTrackingURL is ignored.
Note:
The string passed in as the base URL is not validated; therefore, it is the application developer’s responsibility to ensure that the value is complete and correctly formatted.
Use this method for batch programs such as Application Engine programs do not operate in the context of a site, portal, and node. Consequently, prior to invoking an Application Engine program, the calling program needs to define and store the base URL so that the Application Engine program can use this stored value with the AddTrackingURL method.
Parameters
| Parameter | Description |
|---|---|
|
URLString |
Specify the base URL as a string. The base URL is used to construct a fully qualified drilling URL. |
Returns
None.
Example
The ExecQry step of the PSQUERY Application Engine program invokes the AddTrackingURL method using a value stored in the run control table prior to executing the query.
&aQry = %Session.GetQuery();
If &aQry.Open(PSQUERY_AET.QRYNAME, &bPublic, False) = 0 Then
&aQry.AddTrackingURL(PSQUERY_AET.URL);
...
&Result = &aQry.RunToFile(&rcdQryPrompts, &sOutFile, %OutDestFormat, 0);
End-if;