1

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?

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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