Environment : Foundation 2010

I have two helpdesk lists. In List A, the user create the item and an ID is automatically assigned.

My workflow is used to copy that item in the list B. However IDs are not the same (because in some cases some elements are archived). Then I want to keep the same ID on both items.

I see that we can do it with Powershell, but I don't have any access to the Central Administration. Maybe with Client Object Model ? I never use that before.

I tried with lookup field but it doesn't work, as well.

Another way to do that ? It's terrible to see that Sharepoint doesn't even include that functionnality...

EDIT : Here's a screen of which "ID" I'm talking about (ID directly in the list)

enter image description here

EDIT 2 : Here's a screenshot of the update action

enter image description here

  • are you speaking of sharepoint internal ID? like item.ID? – Gwny May 2 '16 at 7:56
  • @Gwny Updated my post. I'm talking about the ID directly in the list. I want to keep the same IDs to work with in my workflow. – Slabre May 2 '16 at 8:02
  • 1
    you cannot have same ID diectly, workaround is possible untill the same item ID is present in 2nd list – Gaurravs May 2 '16 at 8:04
  • you can create extra column with name 'OrigID' in list 2, and store the list 1 item ID in OrigID column in list 2, and use that column as reference in workflow. like primary and foreign key concept – Gaurravs May 2 '16 at 8:06
  • I cannot do that. I dont have the option "ID" when I try to update. I can just update the "Content Type ID" which can only have thses values : "Problem" or "Folder". – Slabre May 2 '16 at 8:18

Each list keeps its own IDs and you will not be able to keep them perfectly in sync. Create a helper columns and let the workflow copy the ListA ID into that field, then refer to that field as the common ID.

If you use the workflow step "Create item" instead of copying an item, you can transfer any field value from the current item to the new item, as shown in the screenshot, where the Title field in the other list will get the ID of the current item.

enter image description here

Edit I: I think you need to forget about the SharePoint ID and create a unique ID with a workflow. Write that unique ID to a field in List B and then also write that same ID into a field in List A. That way you can identify an item in the other list by the unique ID.

Edit II: Create a helper list (IDNumber) with one item and a number field. This will have the last used unique ID number. Manually set to any number you want as your start number. The ID of this item is easy to find out. Should be 1, if not, look it up.

User creates item in ListA, workflow kicks off, set a variable to the value of IDNumber item where ID = 1 (i.e. look up the last used IDNumber). Use a Calculate step to add 1 to that variable and write to variable NextNumber.

Then write NextNumber to item in ListA, create item in ListB, write NextNumber to item in ListB. Finally set only item in list IDNumber to NextNumber.

  • I cannot do that. I dont have the option "ID" when I try to update. I can just update the "Content Type ID" which can only have thses values : "Problem" or "Folder". – Slabre May 2 '16 at 8:15
  • Of course you can copy the ID. I added a screenshot. – teylyn May 2 '16 at 8:26
  • Thank you. However, I need to "Search a list item" with a field and a value corresponding. I added a picture in my first post. So, I cannot find elements by ID because they're not yet updated, see ? – Slabre May 2 '16 at 8:34
  • I don't understand. If you use a workflow on an item, it must have been saved already, so it must have an ID. User creates item in List A. Workflow starts and creates item in List B. Write ListA ID field to another column in List B. – teylyn May 2 '16 at 8:47
  • Or are you trying to change an EXISTING list item in another list? – teylyn May 2 '16 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.