1

I've been trying to get this to work but need some direction. Got a requirement for a list item that on submission would create another list item and link to it. So basically a lookup on the ID of the linked item on the other list.

I've got the 2 lists but the problem might be the ID won't be created until the other list item has been submitted. I'm thinking Workflow to try create an auto ID and have the 'Submit' button somehow save the original list item and navigate to the new form?

Am I on the right track here?

Thanks

3 Answers 3

2

Create field on list 1 to store value -> Create a workflow so when you create item on List 1, it creates item on list 2. Then waits 1 minute, then updates List 1 with ID from List 2. This way the pause will allow the ID to be generated before attempting to update it. This works if you don't need immediate access to the ID link and can wait 1 minute for it to update.

Workflow

If you want it to link both ways, create a column in list 2 to store list 1's value and have it update when the workflow creates the list item.

On new -> Create item in list 2 -> Create item in List 2 and update [ID Link Column] with [ID] list 1 -> Pause for 1 minute -> Update List 1 [ID link Column] with [ID] list 2

2
  • sounds promising thanks Ryan, I will try implement this
    – pigeon
    Commented Jan 19, 2015 at 6:07
  • 1
    Instead of pause for duration, you could use Wait for created by to equal CurrentItem:Created By. I'd imagine the ID for the entry would need to be generated before Created by is assigned. This way you don't have a bunch of workflow instances paused for a minute. Commented Jan 19, 2015 at 20:21
0

One way to do this can be by creating an ItemAdded event handler in the first list. In the event handler code add an item in the second list and retrieve the ID of this newly created item and then finally update the lookup column in the first list using above ID.

0

Why not submitting the second item first using REST or JSOM, and when it's submitted you get the ID and use it to link and submit the first item.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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