Skip to main content

Hello,

I have created a workflow to create item in another site.

This workflow is updating the items in the list created in sub site.

Problem is when I modify the item in source list, this workflow instead of updating the item created, it is creating a new item.

Please help me in this. I don’t want new item to be created in destination when item is modified in source.

Regards,

Shreedhar

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.

v.E.1

Hi,

Before creating the item, you need to check it the item is in the target list.

If found, update it or do not create it and if not found, create it.

Hope this helps

Christophe


Thanks for the quick response Chris.

Can you please guide me on where I do get the option to set condition “If found, update it or do not create it and if not found, create it”.

Regards,

Shreedhar


Hi,

No magic here.

When you create the item in the target list, make sure, you save the GUID of the new item in your current item.

To know if the item already exist, you need to add the action Query List.

List Name is the Target List name

In the filter, tick Select items only when the following is true:

Show the items when column

GUID

is equal to

{Current Item: TargetItemID}

Result count

Add a variable intCount.

Now you can test on intCount in the Conditional Branch

If = 0, you need to create the item and update the current item with the GUID of new created item

If = 1, you can uodate the List item

I have attached the workflow screen shot.

Regards,

ChristopheCreate-Update.PNG


Good info Christophe. 


Christophe or anyone,

I'm trying to do something similar in Nintex Online. When a new item in a List A is created, a subsite gets provisioned that should copy the item data from List A into an identical list in the subsite. However, where I'm getting stuck is updating the new list in subsite with the data. In the "Fields to update" area, I don't know what to put there. If I put in the field Title (the field is renamed though), the workflow gives me an error: "Unable to find list item to update." If I put in the field {Title} or any variation it gives me a different error: "Some parameters failed the validation check. -  InputMetaDataXml] : The parameter value is empty string or whitespace."

Capture.PNG

Edit: I think I understand what I was doing wrong, I was using an update item when there was no data available to update. Instead I had to use Create Item since the list in the subsite is initially blank!


Result count <-- I am unable to find the 'Result Count' in the 'Query List'

Add a variable intCount. <-- I added a variable 'intCount' type: Single line of text. How is the value being updated?

Now you can test on intCount in the Conditional Branch


Hi,

Result Count is a property of a Query List

Check this here.

I believe that intCount must be a workflow variable of type integer or number.

Regards,

Christophe


Reply