Can anyone advise on how to create the "perfect" progress bar? By that I mean one that reaches 100% as the process it is indicating completes. In the formula -
Window.UPDATE(1,ROUND(Counter/RecordCount * SomeNumber,1));
what relationship should "SomeNumber" bear to "RecordCount"? A lot I see are just set at 10,000 but some are a calculation based on RecordCount such as POWER(10,STRLEN(FORMAT(RecordCount))). And should the rounding be up or down?
And in the Text Constant are there any guidelines for the length of "
@1################## " based on the number of records?
A lot of progress bars show 100% well before the process has actually completed and whereas others only reach 10%. The former is annoying and the latter disconcerting for the user. I'd be interested, and grateful for any advice.
Comments
As is this download: NAV Progressbar
What they fail to realize that these processes are manipulating data on a database and at the end the NAV client commits the transaction, and that takes time.
So in a lot of these processes you reach 100 percent but still have to wait till the process commits the data. This is now more true since we have bulk insert.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Always round down so that you don't reach 100% too early. This will solve updating the progress bar even if you loop through 1.000.000 records or more.
If you have a fixed number of records to loop through such a progress bar is easy. Done.
But what if you don't know how many records your loop will need to process before starting the loop? E.g. the Adjust Cost Item Entries does not know at the beginning so it is not possible to fill MaxCnt.
Or in a Repeat Until there is an exit condition so the progress bar goes to 22% and the next thing you know it is finsihed and never reached 100%. I personally think that in these cases there should be no progress bar but just an indication that NAV is still doing something (like an Integer counting up).
FD Consulting
The fact is that the dialog bar does go to 100% early. Try this ... It will show 100%, but simple rounding shouldn't get you 100% before 9950 and even that may be too soon for the users. So as the bar can only show percent anyway (the blue bar too) you may be better off doing a ROUND(abc,100,'<') rather than a ROUND(abc,1).
Even so I do tend to show the commit as a distinct dialog message.
TVision Technology Ltd