The script programmatically adds rows to repeating section. I believe that every time a new row is added the Nintex form recalculates. Any help on this topic would be much appreciated. Thanks for your time,
I have about 6 repeating sections on my form with an average of 20 rows each. When I tab out of a textbox it takes about 10 seconds to move to the next textbox and recalculate. If there is a way to pause the calculations from running perhaps the user could fill out the details and then resume the calculations.
Does anyone have any related experience or can anyone point me in the right direction?
I am not sure on how to fix your issue, but could you share your code on how to programmatically add rows to a repeating section?
Please check out the post here for creating a repeating section. Its built into the form so nothing programtic about that.
Ryan, you may need to rethink your form. If you are doing calculations during runtime, then the more you add the longer it takes to compute. Are those values needed to be calculated on the fly or can you grab the inputs from the user in the form and perform a calculation during submit then show the calculated values?
If the latter is possible, then you could remove some of the calculated columns from the form and do calculations using the calculated columns in SharePoint.
Hope that helps.
Sorry Ryan. Didn't mean to take over your thread.
What I am doing is this. I have a repeating section on my form where a user can type in the Quantity, Product Number, etc of an item they wish to order. It is free form for business reasons. I also have a section on the form where we have prebuilt products that the user can select from as well by drilling down through 3 cumputed drop down lists. Once they select the product they want I have a button that I would like to be able to code to add the product they selected to the repeating section. Make sense? I can do this easily by just making 10 seperate lines for their order, but did not want to limit them to that many line so I am trying to use the repeating section to house the entire order. So in essence I am trying to programmatically add a new line to the repeating section and populate it with the product they selected from the drop downs.
So my instinct says to redesign your form and include the pre-built products as part of your repeating section. Instead of making it an exception, make it the norm and the other items as exceptions.
That may not work, but its my first thought. You could also just have two sections, one for pre-built products and the other for new products. This is kinda what you have. Where they can choose from one or more.
After some quick thinking, I think part of the problem is that you don't know what all products or whatever may be requested. Why not give them the ability to create new products, then your repeating section only pulls from a predefined list of options. If the option doesn't exist, they can put a request in or if you're good you can have them add the item as an option and then finish filling out their form. Not easy but doable with some work.
NWF$("a:contains(Add New Row)").click();
If you want to add a button that says "add 10 rows" you can just add the script 10 times or make a for loop that loops 10 times.
The issue that I am having is the calculations that are in the repeating section are taking a really long time to calculate. I'll post more of my issue on the main part of this thread when I get a chance.
The screen shot below shows a sample repeating section that I'm using. There are about 6 of these repeating sections on my form that the user needs to fill out. Each section can have a large number of rows to fill out (10-50 items). Each one of the totals from the repeating section is carried down to a calculation in the next repeating section. (I'm not going to explain the entire business logic we are using here) When there are several items in each of the repeating sections the calculations slow down and it takes 10-15 seconds to tab between cells and it ruins the user experience.
My revised question - Is it possible to pause the form calculations while the user is filling out the input information like description, quantity, unit hours, etc. and then when they are complete click a button to resume the calculations?