Setting a Drilling URL

A drilling URL provides a clickable link in query results allowing a user to drill from the query results to another query, to another component, or to an external site. A drilling URL is defined as a special type of query expression. Like other query expressions, the user can set the drilling URL on the Edit Expression Properties page, or the drilling URL can be set in a PeopleCode program as follows:

/* Setting a drilling URL */

&aQueryExpr = &aQuerySelect.AddExpression(&sExprName);

/* Set the expression type to drilling URL */
&aQueryExpr.Type = %FieldType_URL;

/* Set the expression text and number from record fields */
/* The Text property must conform to expected formats    */
&aQueryExpr.Text = &rRecordExpr.QRYCRIT1EXPRTEXT.Value;
&aQueryExpr.ExpNum = &rRecordExpr.QRYCRIT1EXPRNUM.Value;

Note:

Run-time processing of drilling URLs is backward compatible. Therefore, drilling URLs that were defined in previous releases are expanded correctly in the current release without the need to redefine them.

For a drilling URL, the Text property of the QueryExpression object must conform to one of three expected formats. The value of the Text property is not validated; therefore, it is the calling program’s responsibility to ensure that value is complete and correctly formatted. Each of the drilling URL types has a different format as follows:

  • The drilling URL for a component requires the following format:

    '/c/menu.component.market?Action=Usearch_key=unique_field:unique_field_URL_is_mapped_to'

    For example:

    '/c/QE_SAMPLE_APPS.QE_DEPT_TBL.GBL?Action=U&DEPTID=A.DEPTID&SETID=A.SETID:A.SETID'
  • The drilling URL for a query requires the following format:

    '/q/?ICAction=ICQryNameURL={PUBLIC|PRIVATE}.query_name&unique_prompt_key=unique_field:unique_field_URL_is_mapped_to'

    For example:

    '/q/?ICAction=ICQryNameURL=PUBLIC.DESTINATION&BIND1=A.DEPTID:B.DEPTID'
  • The drilling URL for an external site requires the following format:

    '/e/?url=[full_external_URL]:unique_field_URL_is_mapped_to'

    For example:

    '/e/?url=[http://www.yahoo.com]:A.SETID'