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

update and delete list item

hello,

I have two lists. list A copy items to list B. When a item in list a is updated, it copy the item to list B with a different ID. I want to delete the old item in list B and keep the updated item with the new ID.

Labels: (2)
0 Kudos
Reply
11 Replies
emha
Nintex Newbie

Re: update and delete list item

something like this?

consider current item to listA and testlist listB

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: update and delete list item

As per my understanding:

  • Whenever an item is created in ListA it gets copied into ListB.
  • When you update an item in ListA the updates get copied into ListB but new item is created instead of updating the current item in ListB

You may be using the "Create Item Action" for both Item creation and Item update condition .I may have tried the following option

1)I would create a Column "Flag" in "ListA" whose initial value would be 0 but as soon as the items gets copied in the ListB I would set it to 1,In my code will include "Switch" condition in the beginning to check if"Flag" is  0 or 1 ,if its 0 then use the condition "Create" item if its "1 " use the condition "Update item" you would have some column i.e "Title" which can be used in Where condition. With this technique your items would remain in sync and new item would be created in ListB only once

2)If you want to create nmultiple "Ids" for the same item in ListB then use delete condition to delete item in ListB by using "Title" in Where then create a new item

0 Kudos
Reply
andrewg
Nintex Newbie

Re: update and delete list item

It sounds like each time the item in List A is changed you want to create or update the item in List B. The Copy Item function creates and overwrites. The overwrite ability will keep the ID intact and also not increment versions.

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: update and delete list item

I tried "Copy Item" few days back but I observed that it created new items in other list every time instead overwriting it

0 Kudos
Reply
andrewg
Nintex Newbie

Re: update and delete list item

Really? Was the title changing?

0 Kudos
Reply
Not applicable

Re: update and delete list item

My variant. Create field in list B named "ID". It will contain id of copying item from list A. All items in list B will know from where it was copy. And before copy delete all items with same id of copying item.

Sorry for my English. I hope my words make sense.

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: update and delete list item

No, We have the same title but multiple items in another list  and "Overwrite the existing item" is also checked in the workflow

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: update and delete list item

Why dont you try the solution that I have given,It worked for me and I am using that

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: update and delete list item

That was really surprising for me,but copy items action when trigerred both in case of item create/Update will create multiple items for each update

0 Kudos
Reply