Sharepoint / Sharepoint Desginer: Create a dynamic link that opens in a blank page

So I recently had  a request for a title link to open in a new page. I could not find a solution that adequately did what I needed so I came up with my own solution that includes a holder field, a workflow action, and a calculated column.

First create a single line of text field (I called mine “Link Holder“).

Then in SharePoint Designer make a workflow that puts together the html you would like using the Set Field to value action.

ex: Set Link Holder to <a href=’[Encoded Absolute URL]/../Item/displayifs.aspx?ID=[ID]‘ target=’_blank’>[Title]</a>

In the above example I am pulling the main part of the url from the Encoded Absolute URL field, the current item’s ID for the URL and Title for what the link displays. I have added in target=’_blank‘ to make it open in the new page.

After you had done that go back to SharePoint and create a Calculated column.
– Put the Link Holder field in as the formula.
– Set the data type as Number (for some reason this is the only way to make it read as html)

This gives you exactly what you want.

The only issue you will notice is that it is left aligned. This can be fixed by adding a Content Editor Web Part to the page and putting in the appropriate css:

All my cells have a class of ms-vb2 and a <div> with align=”right” so my css in the web part looks like the following:

<style>
.ms-vb2 div {text-align:left;}
</style>

Please note that this aligns all the cells to the left, so if there are cells that you do not want this to happen for, this may not work for you.

This entry was posted in SharePoint, SharePoint Designer and tagged , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted November 13, 2020 at 1:08 am | Permalink

    wonderful points altogether, you simply won a emblem new reader.
    What may you suggest about your put up that you simply made
    a few days ago? Any sure?

Leave a Reply

Your email address will not be published. Required fields are marked *