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

%3CLINGO-SUB%20id%3D%22lingo-sub-2113751%22%20slang%3D%22en-US%22%3EAssign%20ID%20to%20another%20column%20within%20same%20item%20(without%20Flow)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2113751%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Efollowing%20requirement%3A%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20to%20copy%20the%20value%20of%20the%20ID%20field%20in%20a%20document%20library%20to%20another%20column%20(e.g%20DocID)%20within%20the%20same%20document%2Fitem.%26nbsp%3B%3CBR%20%2F%3EIs%20it%20possible%20to%20use%20lookup%20column%20for%20this%3F%20I%C2%B4ve%20tried%20it%20but%20I%20have%20to%20assign%20the%20ID%20then%20manualy.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20avoid%20to%20use%20a%20flow%20and%20would%20prefer%20an%20out%20of%20the%20box%20approach.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2113751%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2113814%22%20slang%3D%22en-US%22%3ERe%3A%20Assign%20ID%20to%20another%20column%20within%20same%20item%20(without%20Flow)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2113814%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F817678%22%20target%3D%22_blank%22%3E%40Christoph1982%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20no%20SharePoint%20out%20of%20the%20box%20way%20to%26nbsp%3B%3CSTRONG%3Estore%2Fsave%26nbsp%3B%3C%2FSTRONG%3Ethe%20value%20of%20ID%20in%20another%20column.%20Possible%20workarounds%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ETo%20store%20the%20value%20in%20another%20column%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EUsing%20Power%20Automate%20flow%2Fworkflow%20-%20Recommended%3C%2FLI%3E%3CLI%3ECalculated%20column%20with%20formula%20%3CSTRONG%3E%3D%5BID%5D%3C%2FSTRONG%3E%20-%20%3CSTRONG%3ENot%20recommended%3C%2FSTRONG%3E%20(Works%20inconsistently)%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ETo%20show%20the%20value%20in%20another%20column%20in%20document%20library%2Flist%20view%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EIn%20SharePoint%20online%20modern%20experience%2C%20you%20can%20use%20JSON%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ecolumn%20formatting%3C%2FA%3E%20to%20show%20the%20value%20of%20ID%20column%20in%20another%20column%20in%20library%2Flist%20view.%20Use%20below%20JSON%20for%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%22%2C%0A%20%20%20%22elmType%22%3A%20%22div%22%2C%0A%20%20%20%22txtContent%22%3A%20%22%5B%24ID%5D%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional 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.