Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Time remaining value in progress bar

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

I am using progress bar & only issue i have is that it shows incorrect time remaining. Please refer to pic & code below & suggest a fix so as to ensure that it shows correct time remaining values.

pastedimage1603985580562v2.png

protected  void processMyFile()
{
    SysOperationProgress importProgress = new SysOperationProgress();
    #AviFiles
    int cR,tR;

    importProgress.setCaption('Importing');
    importProgress.setAnimation (#AviTransfer);
    importProgress.setTotal(500);
    tR = my logic which gets total numbe of records;
        
    for (cR= 1; cR < tR ;cR  )
    {

        this.myImportProcess();
        importProgress.setText(strfmt('Importing record num %1 of total records to be imported %2',cR,tR));
        importProgress.setCount(counterOfRecordRows);
                    
    }// for ends

}

Thanks

Mav

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,091 on at
    RE: Time remaining value in progress bar

    Hi Mav,

    The estimated time is calculated based on the pace of count increment for progress. Maybe you can get a more precise time if you will use incCount method after each imported row instead of setCount.

    Also, why do you use constant 500 instead of real total count "tR" in SetTotal?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,983 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans