How do I display the ID using JSON formatting?

Copper Contributor

I'd like to display the ID of the open item in the header using JSON formatting, is this possible?

 

I tried [$ID], but got an error that it doesn't exist.

 

Thanks

3 Replies
I've found a work around to my question. I created a calculated column that references [ID] which I can use in my JSON.
this has always been a pet peeve of mine that id is not exposed for use.

@dlprentice @emersonbruce Yes, it is a limitation of SharePoint list form JSON formatting.

 

You can read more information about it at: Can ID column be displayed when configuring a list form header using JSON? 

 

Creating a calculated column based on item ID (like =[ID]) and using it in list form JSON formatting by referring to internal name of SharePoint calculated column is a workaround which might work you for sometimes but it is not officially supported by the Microsoft:

 

You cannot reference the ID of a row for a newly inserted row. The ID does not yet exist when the calculation is performed.

 

SourceIntroduction to SharePoint formulas and functions 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.