Generating a URL in an RTF field using a workflow
You can create a workflow that generates the URL, which is then applied to an RTF field. The external link option on the Link Options dialog box triggers the active link associated with it to generate the actual URL.
To define a workflow to generate an external URL
- Create a form or use an existing form, and add an RTF field and a button field on the form. For example, you can create a form with the following objects in BMC Remedy Developer Studio.
- A regular character field to enter an URL.
- An RTF field to copy the URL from the regular character field using a workflow.
- A button to trigger the workflow.
Select the button and in the Properties window, set the Visible property to False.
- Select the RTF field, in the Properties window, select the External URL Button property and click the ellipses button.
- In the Field Selector dialog box, select the button field to link it to the RTF field. For more information, see Selecting-a-field-with-the-Field-Selector-dialog-box.
- Save the form.
- Create an active link associated to the form that uses the Button/Menu Field execution option and specify the button field.
- Define the required workflow actions needed to generate the URL string. Note that the last action must be a Set Field action to set the generated URL from the character field to the RTF field. Using the Set Field action, set the contents from the character field to the RTF field
- Save the active link.
Verifying the workflow
You can verify the defined workflow using BMC Remedy Mid Tier.
To verify the workflow for inserting an external URL
- Open the form in BMC Remedy Mid Tier.
- Enter an external URL in the character field. You can specify the URL in the following formats:
- www.bmc.com
- http://www.bmc.com
- <a href="http://www.bmc.com">
- Open the RTF Editor.
- Select the text to add a link to the external link.
- Click the
option to open the Link Options dialog box.
Click the
option next to the Link URL field.
This triggers the workflow associated with the RTF field to generate a URL and inserts the URL in the Link URL field.- Close the Link Options dialog box.
- Click OK to close the RTF Editor.
- If you click on the selected text in the RTF display mode, the specified URL opens.
Generating URLS that link to the form Data
The RTF fields can generate a URL dynamically in the display mode based on AR System defined attributes provided in the HTML tag. The dynamic URL enables users to link to a specific entry or a set of entries on the AR System server.
Perform the following steps to generate a dynamic URL:
- Open the form that you created in BMC Remedy Mid Tier. See To define a workflow to generate an external URL.
- Click the expand box next to the character field to open a dialog box.
Enter an HTML tag using the following format to generate a URL.
<a href ="" arschema="form_name"arqual="qualification" arserver="servername"
For example, <a href ="" arschema="User" arqual="RequestID=1"The following table lists the attributes that you can use in the HTML tag to generate a URL for a specific entry.
Attribute
Description
href
Source URL. For dynamic URL, you must add this attribute with an empty string. For example href =""
arschema(Optional) Form name. To link to an entry on the current form, you can ignore this attribute and the current form is assumed.
arserver(Optional) Server name. To link to an entry on the current server, you can ignore this attribute and the current server is assumed.
arentryidEntry ID or request ID of the entry on the server.
Note: If you use arentryid attribute in the tag, you cannot use the arqual attribute.arqualThe qualification to open a specific entry or entries on the form. The form opens in the Search mode with the matching entries in the list. Note: If you use arqual in the tag, you cannot use the arentryid attribute.
arvui(Optional) View name. If you do not specify this option, the form opens in the default view.
arattID(Optional) Attachment ID. This opens an attachment embedded to a specific attachment field ID on the specific form.
- Click OK.
- Open the RTF Editor.
- Select the text to add a link to the external link.
- Click the
option to open the Link Options dialog box.
- Click the
option next to the Link URL field.
This triggers the workflow associated with the RTF field to generate a URL based on the attribute specifications and updates the URL in the Link URL field. - Close the Link Options dialog box.
- Click OK to close the RTF Editor.
- (Optional) Select the Open in a new window option to open an external URL on a new window.