September 16, 20232 yr I sometimes need to loop through thousands of records and perform lengthy calcs on each record, so this operation can take hours or even days to complete. I use freeze window so as to not slow down the operation, but is there a way to display a continuous loop counter or progress bar?
September 16, 20232 yr 1 hour ago, human said: is there a way to display a continuous loop counter or progress bar? I don't think so. What you could do, though, is pause the script every N records for a fraction of a second. This will refresh the window and update the layout object displaying a counter/progress bar. You may also want to look into streamlining your calculations.
September 16, 20232 yr Additional things which can help: 1. Be on form view instead of list or table view 2. Run the script via PSOS (Perform Script on Server) 3. Switch to a Utility layout with no fields I suspect that you are using unstored calculations or even worse - calculations which are based upon other calculations which are based upon even other calculations. Even with highly-complex structure and complex calculations, it shouldn't take days. It might be worth allowing a professional Developer to review your file to identify the bottlenecks. I hope you figure it out - that would be quite frustrating!
September 18, 20232 yr Author The main concern is that I haven't messed up the code so as to create an infinite loop. I do run the scripts server-side, normally, and that creates the additional challenge of getting some kind of feedback. The best I have figured out is to send myself emails on errors, or every thousand or few thousand or so steps, so I can see how it progresses.
September 18, 20232 yr 5 hours ago, human said: The best I have figured out is to send myself emails on errors, or every thousand or few thousand or so steps, Maybe you should consider a different strategy: Divide your records into groups of say one thousand records each. For each group, perform a separate script on the server and get the feedback through the Get(ScriptResult) and Get(LastError) functions.
September 18, 20232 yr Author 16 minutes ago, comment said: Maybe you should consider a different strategy: Divide your records into groups of say one thousand records each. For each group, perform a separate script on the server and get the feedback through the Get(ScriptResult) and Get(LastError) functions. That could work, thanks
Create an account or sign in to comment