Solved

I need to create item in two lists using one form.

  • 30 November 2018
  • 3 replies
  • 130 views

I need to create items in two lists using one nintex form. i have one list related to orders and and other related to items in orders i want to create an order i.e. using nintex forms with repeating controls for order items which needs to go in separate table. As i have checked online that out of box its not possible but we can use javascript on submit button of order to enter items in order item list.

i am new to nintex forms can someone help me with sample code/other resources to pick data from repeating control and create item in other list? i am good with jsom but not sure what is the difference in plain  javascript and the one is written in nintex( "NWF" and other string are appended).i also have thought of saving order items as repeating control(xml format) and then workflow to get the plain text but in that case items will be created using workflow which we are not keen for.

we have these two tables as we want to execute our approval workflow on order not individual items and items need to be in separate list so backend team can procure them.

Thanks for advance:)

icon

Best answer by Chris_Ben 5 December 2018, 01:41

View original

3 replies

Userlevel 6
Badge +12

Hi Ajit,

I would not try and write data back to lists using JavaScript from the form.  Submit the form and let the workflow do all the hard work using native Nintex actions.  Your form will contain both the order details and order detail rows (the detail rows are contained within a repeating section).

Check out this post which summarises what you need to do.

Cheers,

Chris

Thanks for reply,

Creating items with workflow leave a little chance of order being saved and items not, due to issue with workflow etc. We are not keen to create main items using workflow. The link is very good but it talks about a wsp I am not sure I can do much with this as we are having office365 environment.

I feel writing javascript will be most apt, any help on that or alternative solution suggestion are welcome .

Thanks again for reply and sparing time for my help

Userlevel 6
Badge +12

Hi Ajit, you don't need the wsp - that was only for displaying the repeating data in a formatted table in a view.  The concept discussed in the post is still the same whether it is for on-prem or o365.  You shouldn't have any issues with the order either as you can create this with a counter as you are iterating through the detail lines.  Here's another post specifically talking about an o365 implementation.

Cheers,

Chris

Reply