locked
How to add value to ID column and concate output to text in calculate field in SharePoint ? RRS feed

  • Question

  • Hello Folks,

    I want to add ID value to 1000 when item is created/edited e.g. 1001 I created column call Project_ID with formula : 

    =SUM(1000+ID)

    However, when item is added/edited output comes as "1000" not as "1001" or "1002" or so on....

    Pls advice as what i am doing wrong.

    Thanks, Chintan

    • Edited by Chintan123 Thursday, October 4, 2012 12:37 PM
    Thursday, October 4, 2012 12:06 PM

Answers

  • Thanks Hemendra. I got solution from ID column iteself. 

    Solution:

    Create Numeric column in list say "IDasNumber"

    Create workflow via designer and Set above field to ID column field as Action. Note: Create workflow only to trigger during Adding an item.

    Create calculated column in list with formula - =CONCATENATE(SUM(IDasNumber,1000000))

    That's sit. 


    Thanks, Chintan


    • Marked as answer by Chintan123 Thursday, October 4, 2012 2:21 PM
    • Edited by Chintan123 Thursday, October 4, 2012 2:22 PM
    Thursday, October 4, 2012 2:20 PM

All replies

  • Hi,

    I believe you are using calculated column so if you use ID column in that field then it will disappear on add/edit so don't try to use ID in calculate column. So better you create your own ID and lookup the ID as mentioned in below blog:

    https://www.nothingbutsharepoint.com/sites/eusp/Pages/sharepoint-how-to-create-an-auto-incrementing-number-field-for-use-in-a-custom-id-part-1.aspx

    Hope it could help


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

    Thursday, October 4, 2012 12:45 PM
    Moderator
  • Thanks Hemendra. I got solution from ID column iteself. 

    Solution:

    Create Numeric column in list say "IDasNumber"

    Create workflow via designer and Set above field to ID column field as Action. Note: Create workflow only to trigger during Adding an item.

    Create calculated column in list with formula - =CONCATENATE(SUM(IDasNumber,1000000))

    That's sit. 


    Thanks, Chintan


    • Marked as answer by Chintan123 Thursday, October 4, 2012 2:21 PM
    • Edited by Chintan123 Thursday, October 4, 2012 2:22 PM
    Thursday, October 4, 2012 2:20 PM