help creating dynamic link in calculated column

I have a calculated column in a custom list. In it I am trying to create a link that points to a document library in the same site that is filtered by a column they both have in common.

An example URL for a filtered view of the document library is:

https://domain/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=FilterField1=Agreement-FilterValue1=IAA%25202013%252D14%252D122  where the last value is the dynamic part, a column labeled "Agreement Number". In this example the agreement number is "IAA 2013-15-122".

My formula for my calculated column is:

="<a href='https://domain/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=FilterField1=Agreement-FilterValue1="&[Agreement Number]&"'>link label</a>"

which produces the final URL when I hover over the link and look in the status bar.

https://domain/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=FilterField1=Agreement-FilterValue1=IAA 2013-14-122   

However, when I click on it, this is the final URL that shows the empty library (it is short)

https://portal.sbctc.edu/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=14%3D-122%3D-FilterField1%3DAgreement-FilterValue1%3DIAA%202013

It seems like it should but it just shows an empty view (no documents).

July 28th, 2015 7:41pm

Hi run4it.

Based on your last url, the month and day of the date location are different from the url in the status bar which you hover over the link.

Please use IE developer tool (press F12) to detect this hyperlink href attribute, see if it's correct.

https://domain/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=14%3D-122%3D-FilterField1%3DAgreement-FilterValue1%3DIAA%202013

Also please test the url format which is dispalyed in the status bar, see if the document could be viewed without encoding the special character(e.g. blank space, dash).

And also check if using "concatenate" function could work.

http://sharepoint.rackspace.com/calculated-columns-tutorial

Thanks

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 2:57am

Hi run4it,

How is the thing going on? Is there any update?

Thanks

Daniel

August 10th, 2015 11:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics