Forum Discussion
Many thanks for the post! We haven’t had these kinds of experimental projects in this forum for years!
Here is a collection of random thoughts I have regarding the idea:
- According to your C# sample, you simulate a long-running C# method. However, I assume it is not actually running asynchronously in the background. Can this work for a ProgressBar for Server Methods?
- A classic approach for long-running server tasks in Aras Innovator is to use the Conversion Server to execute them in the background.
- Once I wrote something in this forum suggesting that newer Innovator versions seem to support async server methods. Right now, however, I’m having some trouble finding my previous post and the source that led me to this conclusion… 💀
- You include extensive error handling - love to see this!'
- Outdated code: fieldContainerEl = top.document.getElementsByName(propName)[0]; → Remove "top". We no longer use top references in 2026.
Progress bar ideas
- Idea #1: Use a string property with a percentage value (e.g., "20%"). Color the background according to the percentage. With CSS, you can style the background so that it visually behaves like a growing bar.
- Idea #2: Use an SSRS or Power BI report with a data bar. If it´s just an admin view that is not needed on a daily basis....
- Idea #3: Use an Images property. Store many images representing 10%, 20%, … 100% in your code tree. So you just update the image to "update" the progress bar. Customize the stylesheet in the codetree to make this specific image property larger. Yes, I have tried something like this before. A lot of work to get the stylesheet right..... :D.
Thanks! I've continued working on this project, and am successfully using it as a progressbar & logging mechanism for one of our server methods.
I moved the trigger to an action on a part, that javascript method creates the progressbar item and passes any required information (part ID, etc) to the progressbar item, and onload of the form it triggers the second javascript method which 'initializes' the process and then repeatedly calls the server method to do the processing. So a 3-method system... trigger, controller, server
This appears to have the benefit of giving the server a break so it doesn't bog down, and I introduced a timer to all me to adjust that spacing between calls... and I can also put debugging information into the console if I like
Using the conversion server is a good idea too, how do you tell Aras what server to process a method on?
I was also wondering about the Async methods, I'm guessing its there (C# supports it), but I haven't tried it. but it doesn't solve my logging needs.
It also goes very slow if its 1 by 1 part on a large BOM (too much updating) so now it can call the server method in 'chunks' , ex it processes 100 parts in a BOM at a time... but the progressbar is going in chunks too so I'm trying to figure out how to balance the visual with the performance.
The CSS idea is fantastic! I'll try it this week and let you know how it goes (I'm not great with the HTML / CSS world). Where did you put the '.state...' code into Aras? Images was my backup plan, I could probably make .jpg of the bar at 1% increments and change it and it would update on a refresh? maybe not that much better than the % number I already have...