cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pass ID between two list forms

Hi,

Because of the size I want to divide one SharePoint list to two and connect it one-to-one. And when user adding item to first list and "click" Save I want to redirect him directly to NewForm of the second list. And this I did by "Redirect URL" in form settings.

But to connect this two list in NewForm of second list l need the ID (I also thought about some guid) of the item from the first list. I thought to send ID from first list to the second in url string but the problem is that this ID in unknown when Save is "Clicked". I also try to do it with guid: I added new field to thirst list and in NewForm use Inline function fn-NewGuid() to set value for this filed. Unfortunatelly value of this field also is unknown when save is clicked. And as far as I know I cannot use javascript to build "Redirect URL" in form settings.

Does anyone have som idea how to make it? It is at all possible in Nintex forms?

regards

JM

0 Kudos
Reply
5 Replies
Workflow Hero

Re: Pass ID between two list forms

Some ideas:

1)Next Id

     On almost all cases (if there is not another user adding items), you could get the last ID of your list with the lookup function, then add 1 to it and you'll have the next ID.

2)Your own GUID

     You could set your own GUID, setting it on a javascript or jquery $.guid

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Pass ID between two list forms

Could I ask what the second form needs to accomplish? Will it update the previously created item? Or will it create a new item but have the previously created item as a reference in a lookup field? Will it be saving items in the save list?

0 Kudos
Accept as Solution Reply
Not applicable

Re: Pass ID between two list forms

Both in fact. It will create new item reference to previous one in a lookup field and also in some cases I would like to update previously created item.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Pass ID between two list forms

Thanks for the tips.

Unfortunately the first one is not acceptable in my environment.

And about second idea ->  As far as I know I cannot use javascript to build Redirect URL in form settings.

My current solution for that is to create a custom webpart which create and save new, empty item and then opening edit form. And put this webpart on new form page. So in that scenario I have Itme ID in edit form and can pass it to next form. Disadvantage of this solution is that the user clicked Cancel on Edit form I have to delete the item.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Pass ID between two list forms

I am going to attempt the 'nextID' idea but need this to work with more than 2 pages/forms, which will have a key field on each page.  Any Javascript code, etc..   Or would it work better to run a workflow after all pages are created/saved and link them with TextID which will increment the key field.  ie:  url+ABCTextID systemID.

0 Kudos
Accept as Solution Reply