Include Links Using HTML Tags
Links to websites and documents can be included on a screen using the HTML tag <a> in a label control. Documents can be located on a website, or stored in a policy model project as a custom file.
To add a link on a screen using HTML:
- On the Interview tab in Policy Modeling, open the screen where you want to include the link.
- Add a Label Control.
- Select the control in the screen layout view.
- Click the text once and change it to include the necessary HTML tags. Note that to link to a document in the project:
- use the ${resources-root} substitution in the HTML which will be automatically expanded in the interview to the current root path to the resources directory.
- add your document to the /interview-theme/resources folder in the project directory. (This folder is created when you click the Custom Files button in the Styles dialog box on the Interview tab.)
- Press Enter. The screen layout view is updated to show the text as it will appear in an interview.
Tip: The Business License Wizard, Copyright Permissions, Emergency Response, Employee or Contractor, Hazard Management, Health Diagnosis, Healthy Eating, myBenefits, Parental Leave Calculator, Patient Safety Incidents, Safety Inspection, Student Benefits, Travel Compensation and Warranty example policy models show how HTML tags can be used to add links to websites and documents on an interview screen.

In the Healthy Eating policy model, a hyperlink to a website is included as HTML in label text:
In an interview this is rendered as:

In the Emergency Response policy model, a hyperlink to a map is included as HTML in label text:
Note that this link uses a substituted attribute value (map_URL). This attribute is set using the rule:
the map URL = "https://www.google.com.au/maps/place/" + Text(the GPS location latitude) + "," + Text(the GPS location longitude)
Setting and substituting the map URL in this way enables the map that is shown (when the link is clicked on) to be specific to the user's location.

In the Safety Inspection policy model, a hyperlink to a document is included as HTML in label text:
In an interview this is rendered as:

A hyperlink to a document stored in a project is included as HTML in label text:
In an interview this is rendered as:

You can also use a substituted attribute value in the URL of the site name or file name in the HTML tag. This enables a different website or document to be shown depending on the value of the substituted attribute. For example, in an interview you could ask the user what Oracle product they are interested in and then, using a substituted attribute value in the label text, include a hyperlink to the Oracle site for their chosen product:
In this example, the Oracle URL (URL) is set using the rule:
the Oracle URL = "https://www.oracle.com/cx/" + the product component of the Oracle CX URL
and the product component of the Oracle CX URL is set using the rule:
the product component of the Oracle CX URL | |
---|---|
"sales/" | the Oracle product = "Oracle Sales" |
"service/" | the Oracle product = "Oracle Service" |
"service/intelligent-advisor/" | the Oracle product = "Oracle Intelligent Advisor" |
"" | otherwise |
In an interview, if the user selects Oracle Intelligent Advisor as the product they are interested in, then the label above would be rendered as:
where the Oracle website link points to https://www.oracle.com/cx/service/intelligent-advisor/.
Tip: The Travel Compensation example policy model shows how hyperlinks can be provided to different websites based on the user's language. For more information, see Get the Session Locale.