Vadim Tabakman

Nintex Workflow - Order and Order Items Relationship

The idea behind this process, is that we want to have an order Nintex form that has a repeating section with order items in it.  Those order items, we want to appear in another list.  An Order Items list.  There are a few caveats here.  We want to make sure that if you go back to the original order, maybe it's in the middle of an approval process, and you make changes to those order items, or add new ones, that the Order Items list is updated accordingly.

The other thing, is if someone goes into the Order Items list and makes a change to an order, the original request form should be updated.

This process is built out in 3 workflows.  It could probably be done in 2, but I like separating the New item and Modified item workflows, unless there is a lot of cross over in logic.

The downloads below contain all the files for you to reproduce the scenario that is shown in the video above.  I'd recommend you upload the list templates to your site, the create the lists in this order:

  • Stock
  • Order
  • Order Items

Then open up Nintex Forms on the Order list and import the form.  Open Nintex Forms for the "Order Items" list and import that form.  You'll then be able to import the workflows and publish them, and run them.

EXTRA NOTES

There's no reason why the items needs to go to another SharePoint list.  It could create items in a SQL table, Oracle Table, Dynamics CRM, Salesforce, etc.

Downloads

Posted by Vadim Tabakman Friday, November 3, 2017 9:34:00 AM Categories: For Each Nintex Nintex Forms Nintex Workflow Nintex Workflow 2013 Query List Query XML Update XML XPath
Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Friday, March 30, 2018 7:27:38 AM

re: Nintex Workflow - Order and Order Items Relationship

Hi Vadim,

I recently found I have a need for this. My users thought they would be awesome and edit the child lists manually. Of course if I had this in place it would have been fine. They contacted me and said "all our changes are disappearing."  They did not realize that when they saved the parent it was wiping the child list. 

I am hoping I can use this method. I am still on 2013 on-premise. The forms give me this error "Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe. Correlation ID: 7893589e-0f89-90d7-f07a-324a3128c9a8." when I load them. I can go into the settings from the contents page and make changes but the forms still do not load. I can spend time recreating them but I am curious, will the workflow process work in 2013?

Thanks for this. I was look at TekDogs sublist control and tempted to try it but I do not think I would have the flexibility I have now  placing the fields where ever i choose to.

 

Friday, March 30, 2018 10:17:23 AM

re: Nintex Workflow - Order and Order Items Relationship

I was able to reproduce it to work in Nintex 2013.

It looks like all 3 workflows work properly.

2 things.

1. If I create a new record but do not create an iem the workflow fails. I get the error shown below. In my forms there will be several occasions when nothing it added to a list. How do I check for 0 orders?

Error operating on collection variable. Data type returned from the collection is incompatible with the variable to store the result in.

2. If I delete an order how do I update the the Orders List to reflect the update?

 

Thank you. This is going to be great.

Monday, April 23, 2018 2:35:34 PM

re: Nintex Workflow - Order and Order Items Relationship

Hi Sonoma,

You'll need to check the count of the items in the Collection.  Since you'll have multiple collection variables, if the collections are not the same size, this could be an issue.  

You might need rules in your form to make sure every field has data in it.

For the deletion, if you are deleting a Row from a repeating section, then you should be able to have the workflow look at the rows and compare them to the items in the child list.  If something is missing, then you'll have to delete the item from the child list.

The other way thought, it's not easily done, since you can't have a workflow run when an item is deleted.  That might require you to have a scheduled workflow that periodically check the items in the child list and compares them to the parent item.

Vadim

Thursday, May 3, 2018 2:51:38 PM

re: Nintex Workflow - Order and Order Items Relationship

Thank you.

1. Some sections are empty and will not have data. I was going to try to set a switch for each section, if off(no, n/a, undocumented, etc) just have the work flow skip it. 

2. As for deleting when the record is edited it sets a delete flag for each of the child records for the current record then if it was deleted it does not show up in the collect. If in the collection it updates the delete flag to false. Then I have a global delete that takes care of the true flags. It works sometimes. 

3. Since I was not able to use the SP2016 list in my SP2013 I created them from scratch. The sample work flows did not see everything so I did some guessing as to how the processes work. I am not sure how the existing flags work for updated by human or workflow work since it all seems like it is a work flow.

With that in mind my updates from child list do not work all the time. Sometimes it works if I up date one or two at a time. But if I update several child records in bulk it does not always update the child and the workflows say successful. I can't trust it.  I work with a lot of patient data. When it comes to drugs we can't get it wrong and not knowing is scary. Especially when spot checks show only a fraction of data was updated.

I have only tested on test data which is a copy of a good set. I have not even attempted to implement it on the live data in fear of it not working correctly. Too much of a risk.

May be I did it wrong.

It will also take me a good while to implemented and test it if I ever got it right. In short, I want to do it right the first time.

Thank you again for providing this solution. Maybe I will figure it out.

I just wish it would allow us to directly access the child lists with a two way sync without using work flows or purchasing a 3rd party tool.

 

 

 

 

 

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register





 

Statistics

  • Entries (257)
  • Comments (1765)

Categories