Let's say I have 2 items in a list. If I add a new calculated column with following code then it correctly displays hyperlink against those two items.
="<a href='http://sharepoint2016/sites/somesite/Pages/Default.aspx?k="&ID&"'>Some Link</a>";
This is how the link is displayed (just showing you URL that you see on hover):
http://sharepoint2016/sites/somesite/Pages/Default.aspx?k=1
http://sharepoint2016/sites/somesite/Pages/Default.aspx?k=2
Problem is if I add new item from now on, after calculated column is created then it doesn't display ID of new item. It shows up like this:
http://sharepoint2016/sites/somesite/Pages/Default.aspx?k=
Unless I edit that list column and simply press OK to save it then it starts displaying ID for the newly added item correctly.
How to fix this issue?