Domino Code Fragment

Code Name*
Percent complete in status bar
Date*
02/13/1999
Source (or email address if you prefer)*
Jared Knapp
IP address:.18.216.190.167
Description*
Displays a percent complete progress indicator in the print area at the bottom of users screen
Type*
LotusScript
Categories*
User Interface (Notes)
Implementation:
Modify constants
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Sub Initialize
   Print PercentComplete(30 , CurrentRecord , NotesDocumentCollection.Count)
End Sub


Function PercentComplete(FTGDefault As Integer, FTGCurrent As Double, FTGTotal As Double) As String
%REM
Written by: Jared Knapp
Company: Franklin Templeton Group
Department: IS&T
Date: 2/27/97
Purpose:  Displays a percent complete progress indicator
     in the print area at the bottom of users screen.
Calls: NewIndicator(),
%END REM    
    Dim FTGLength As Integer
    Dim FTGCount As Integer
    PercentComplete = NewIndicator(FTGDefault)
    FTGLength = (FTGCurrent*FTGDefault)/FTGTotal
    If FTGlength >0 Then
         For FTGcount = 2 To FTGlength +1
              Mid( PercentComplete , FTGCount, 1) = Chr(127)
         Next FTGcount
    End If
    Mid (PercentComplete,FTGDefault + 4,4)=Cstr(Cint((FTGCurrent/FTGTotal)*100)) + "%"
End Function


Function NewIndicator(FTGDefault As Integer) As String
%REM
Written by: Jared Knapp
Company: Franklin Templeton Group
Department: IS&T
Date: 2/27/97
Purpose:  Used by UpdateIndicator to Create a Blank Progress Indicator
%END REM
    Dim FTGCount As Integer
    NewIndicator = Chr(127)
    For FTGcount = 1 To FTGDefault
         NewIndicator = NewIndicator + "-"
    Next FTGCount
    NewIndicator = NewIndicator + Chr(127) + "  0% Complete"
End Function