Adding a Toolbox Indicator

Hi Guys,

I'm trying to add a Indicator to display the progress of a change log search on NAV 2009SP1, But I'm not sure where it needs to be pointing at.

Any help would be great

Answers

  • archer89archer89 Member Posts: 337
    for creating a progress window follow https://msdn.microsoft.com/en-us/library/dd338672.aspx
    to calculate the value of the progress bar you need a maximum value, in your case the no. of change log entries according to the filter you use.
    best regards
    Franz Kalchmair, MVP
    Alias: Jonathan Archer

    please like / agree / verify my answer, if it was helpful for you. thx.
    Blog: http://moxie4nav.wordpress.com/
  • RjMaJayRjMaJay Member Posts: 2
    So would this be correct?

    ProgressWindow.OPEN('Change Log Search #1#######');
    REPEAT
    SLEEP(1000);
    ProgressWindow.UPDATE(1,SearchKeys."No.");
    // Process the search.
    UNTIL SearchKeys.NEXT = 0;
    ProgressWindow.CLOSE;
  • archer89archer89 Member Posts: 337
    Looks ok.
    best regards
    Franz Kalchmair, MVP
    Alias: Jonathan Archer

    please like / agree / verify my answer, if it was helpful for you. thx.
    Blog: http://moxie4nav.wordpress.com/
  • vaprogvaprog Member Posts: 1,140
    For a progress bar you need '@' as a placeholder instead of the '#'.
    The value you need to provide for the bar to gradually fill needs to be an Integer between 0 and 9999.
    ProgressWindow.OPEN('Change Log Search @1@@@@@@@@');
    TotalCount := SearchKeys.COUNT;
    REPEAT
      Cnt := Cnt + 1
      ProgressWindow.UPDATE(1,ROUND(Cnt / TotalCount * 9999,1));
      // Process the search.
    UNTIL SearchKeys.NEXT = 0;
    ProgressWindow.CLOSE;
    
    Please consult developer help on OPEN Function (Dialog).
    Note: NAV code uses 10000 as a scaling factor, but help says, it ought to be 9999.
Sign In or Register to comment.