I was asked how to add a custom column with Hyperlink type on an out-of-box contact list so that the custom hyperlink would display a full name while the link will contain an email address. A calculated column cannot solve this problem  because SharePoint converts any anchor tags in any hyperlink in a calculated column from <a href=...>..</a> to &lt;a href=...&gt;..&lt;/a&gt; to protect from malicious script attackes. The problem was solved by using a HyperLink column instead of a calculated column and by using a custom workflow which I created using a SharePoint Designer.

The HyperLink field contains the hyperlink information in link, text format. The link, text is converted as <a href='link'>text</a>. So, the trick in SharePoint Designer workflow was to create a variable with String type, and to set the custom variable to store link, text using a 'dynamic string build' action.

Here, as an example, I will create a Contacts list, add a custom column with HyperLink type, and set the value of custom column using a SharePoint Designer.

  1. From a SharePoint Designer, open the web site which contains the contact list with the custom column.
  2. Create a new workflow by choosing File -> New -> Workflow from a SharePoint Designer.
  3. From the "Define your new workflow" window, give a name to the workflow, and select "Contacts" list. Check the following checkboxes:
    • Automatically start this workflow when a new item is created
    • Automatically start this workflow whenever an item is changed
  4. Click 'Next'
  5. Give a name to the Step Name.
  6. On the bottom of the window, click 'Variables...' button.
    1. From the Workflow Local Variables window, click "Add..." button.
    2. On the "Edit Variable" window, set the name to "EmailLink", and select Type to "String".
    3. Click "OK" to close "Edit Variable" window.
    4. Click "OK" to close "Workflow Local Varabiels" window.
  7. Click "Actions" button to see the list of actions.
  8. Clcik "More Actions..." from the list of actions.
  9. Select "Build Dynamic String"
  10. On the String Builder window, create a HyperLink which would be in link, description format. I used the following text to create an email link:
    mailto:[%Contacts:E-mail Address%], [%Contacts:Full Name%]
    Note: There should be a space(' ') between comma(',') and description. If a space is missing, SharePoint cannot translate the text to a HyperLink.
  11. Set the variable for the Build Dynamic String action to the custom variable created on Step 6.
  12. Now we assign the custom variable to the custom HyperLink column. Click "Actions" button and select "Set Field in Current Item" action.
    1. Set field to the custom column, 'Contact'.
    2. Set value to Variable: EmailLink (see pic 'Workflow4).
      Setting a custom variable to a field in current item
  13. The workflow has been configured. Click "Finish" button to save the workflow.

Here is a sample screenshot of a Contacts list after I added contact information to the list.
Customized Contacts list with a workflow