Assign ID to another column within same item (without Flow)

Copper Contributor

Hi all, 

 

following requirement:

I want to copy the value of the ID field in a document library to another column (e.g DocID) within the same document/item. 
Is it possible to use lookup column for this? I´ve tried it but I have to assign the ID then manualy. 

I want to avoid to use a flow and would prefer an out of the box approach. 

 

 

1 Reply

@Christoph1982 

 

There is no SharePoint out of the box way to store/save the value of ID in another column. Possible workarounds:

 

To store the value in another column:

 

  1. Using Power Automate flow/workflow - Recommended
  2. Calculated column with formula =[ID] - Not recommended (Works inconsistently)

 

To show the value in another column in document library/list view:

In SharePoint online modern experience, you can use JSON column formatting to show the value of ID column in another column in library/list view. Use below JSON for this:

 

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "[$ID]"
}

 


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.