How to add HTML tags using Normalization Rules to create a link within a display field
Created By: Richard Robertson
Created on: 2/26/2019
In order to build a link into a record’s display fields, you could use a combination of normalisation rules to mark-up the link with HTML tags.
For this example, the source field content is: 'For more information about this collection, please visit: https://website.com'
Rule 1:
Transformation:
Drop String (use reg. exp) – create or find a regular expression (regex) that matches on a URL
Result:
“For more information about this collection, please visit: ”
Rule 2:
Transformations:
Add to beginning of string: <a href="
Take string (use reg. exp.) – use the same regex, but this time takes only the URL
Add to end of string: ">
Result:
<a href="https://website.com">
Rule 3:
Transformations:
Take string (use reg. exp.) – same regex takes only the URL
Add to end of string: </a>
Result:
Each rule is set to merge, so the final result would be:
For more information about this collection, please visit: <a href="https://website.com">https://website.com</a>
More information regarding HTML tags via normalisation rules: