Is SharePoint truncating my URL path?

The following is a path to a view of a filtered document library:

https://xxxxxxxxxxxx.edu/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx#InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d6e3=FilterField1=Agreement-FilterValue1=IAA%25202013%252D14%252D122 .

However, when I create this link dynamically in a calculated column the tail end is getting truncated when it renders in the URL field. It takes off everything past 2013, so the FilterValue of "IAA 2013-14-122" becomes "IAA 2013"  and of course the filtered view does not render on the page. Is SharePoint truncating the URL when the page is requ

July 29th, 2015 5:04pm

I'd guess that the computed column has a max length (255 chars perhaps?), after which point yes, it is truncating.
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 6:59pm

Maybe, but where that doesn't make sense to me is that when I hover over the rendered link on the web page and look at the status bar, I see the full URL.  It is not truncating what goes in the href.

Some closer looking revealed that what is in the href is then being "re-arranged" on the call to the server. The resulting page has this URL:

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

See the highlighted text above?  That should be on the END of the URL!  I have never seen anything like that happen ever.

July 29th, 2015 7:16pm

Hi,

In my opinion, the URL path is not so long that will be truncated in SharePoint calculated field.

How did you set the formula of the calculated column in SharePoint?

This issue may be due to the formula set on this column.

Could you please provide more details about this scenario for reproducing and understanding this issue?

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 11:01pm

The formula for the calculated column is:

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

I grabbed that format off of an actual filtered view in the library, then tried to substitute the filter value with a dynamic variable [Agreement Number]

August 2nd, 2015 3:55pm

Hi,

Per my test, the calculated column will display as single line of text instead of a hyperlink as the html tag shows.

Did you use code to display the calculated column as a hyperlink?

I recommend to remove that code part to see if the text shows right in the calculated column.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2015 11:03pm

If you set the datatype for the column as number it will display as hyperlink.

I changed the datatype to single line of text and it renders as in the screenshot:

Also, on an old SP 2007 site I had this same functionality and used javascript to turn it into a hyperlink.  It worked great, but now in SP 2013 when I insert a script editor onto any page, the List/Item ribbons are not visible.  Is this

August 6th, 2015 11:34am

Hi,

I have tested the scenario again in my environment, it seems that the length of the calculated column is limited when setting the data type to number.

I recommend to set the type to text and then use JSLink to display the field as hyperlink.

More about JSLink:

http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 1:34am

Hi ,

Could you please try the same filtered url in a different way like the below :

https://xxxxxxxxxxxx.edu/sites/ITD/SBTD/TSG/General%20Documents/Forms/AllItems.aspx?FilterField1=Agreement&FilterValue1=IAA 2013-14-122

Thanks. 

August 7th, 2015 1:45am

It worked Kumar!  Please tell me what the difference is an how you knew to try the format you suggested?

What is this part:  InplviewHashe40e65b2-fb84-4443-80a2-681e2f17d

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 11:56am

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

Other recent topics Other recent topics