Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a calculation column that I use to display some HTML code that provides a hyperlink in a List view. The user clicks on the hyperlink to jump to another page which will generate a report based on the ID of the item:

="<span><a href='http://domain.com/Site/SiteAssets/Pages/myPage.aspx?View=ReportView&SelectedID="&ID&"'>Report</a></span>"

It all works fine, however, on random occasions, the ID field is calculated as empty, so the link goes to the page but the wrong report is shown. The only way I've found to fix the issue is to open the calculation column, replace the '&ID&' with '&[ID]&' to make SharePoint re-examine the whole calculation and put in all the ID values. It last about a week and then has to be done again.

Any suggestions?

share|improve this question

1 Answer 1

ID is not a supported column in calculated fields for this reason, it's very buggy. The approach to take would be to create a column that you will use in your calculated column and then use a workflow or event receiver to set that columns value on item creation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.