Danny A. del Pilar

Contributed works of Danny A. del Pilar

Browse Test Demo

Easter Sunday Calculation

Generate Gregorian Calendar

HMG source code converter

How to build menu like old ACHOICE function?

KPI (Key Performance Indicator) Dashboard

Return value from modal window (Record Picker) 

Similar SCATTER / GATHER en HMG

Advertisements

SP_S1LABEL

S1LABEL()

  Short:
  ------
  S1LABEL() Prints a single label

  Returns:
  --------
  Nothing

  Syntax:
  -------
  S1LABEL(cLblfile)

  Description:
  ------------
  Prints a single label (1 or more copies) for the
  current record, based on the dimensions and contents definitions in
  .LBL file name <cLblfile>. The dimensions and contents are
  figured, and then presented for printing and/or editing.

  Examples:
  ---------
   setkey(K_F10,{||S1LABEL("MAILING.LBL")} )
                      // sets key F10 to call this
                     // as a popup

  Source:
  -------
  S_1LABEL.PRG

 

SP_ISBLANKREC

ISBLANKREC()

  Short:
  ------
  ISBLANKREC() Determines if a record is blank

  Returns:
  --------
  <lIsblank> => is the record blank

  Syntax:
  -------
  ISBLANKREC()

  Description:
  ------------
  Returns True if the record is all blanks

  Examples:
  ---------
   LOCATE for ISBLANKREC()

   if found()
     // re-use
   else
     APPEND BLANK
   endif

  Source:
  -------
  S_BLANK.PRG

 

SP_FASTFORM

FASTFORM()

  Short:
  ------
  FASTFORM() Prints a selected formletter for current record

  Returns:
  --------
  Nothing

  Syntax:
  -------
  FASTFORM()

  Description:
  ------------
  Presents a picklist of formletters to print against
  contents of current record.

  Examples:
  ---------
   If nChoice = 4    // form letter
     FASTFORM()
   endif

  Notes:
  -------
  Utilizes a form created by FORMLETR() and plugs in
  values from the current record. Interface is a picklist of forms
  available. Depends on the current DBF to match the field values
  in the form.

  Source:
  -------
  S_FFORM.PRG


SP_DUPHANDLE

DUPHANDLE()

  Short:
  ------
  DUPHANDLE() Duplicate record finder with delete/copy options

  Returns:
  --------
  Nil

  Syntax:
  -------
  DUPHANDLE([aFields,aDesc],[aOpenIndexes])

  Description:
  ------------
  DUPHANDLE() is similiar to DUPLOOK(), but takes a
  different approach The user is asked to select fields (only
  Character fields are presented) to check for duplication. The
  fields selected are combined into an index key, and an index is
  created. The database is then scanned for duplicates. If a
  duplicate set is found, a Tbrowse/tag window is popped up, and
  the user is asked to tag records. This continues until all
  duplicate sets are found, or the user chooses to quit the
  process. The user is then allowed to Process the tagged
  duplicate records. There are 4 possible options:

         Delete all tagged records
         Delete all NOT tagged records
         Copy all tagged records
         Copy all NOT tagged records

  The options are not mutually exclusive. For instance,
  you could copy all tagged records to a history file, and then
  delete them.

  As with all SuperLib deletions, the PACKING is left
  to you.

  [aFields,aDesc] are optional arrays of fieldnames and
  field descriptions

  [aOpenIndexes] is an optional array of currently open
  index names. Clipper has no way to determine the names of
  currently open indexes and, since this function creates
  temporary indexes, the current indexes will be closed. Only by
  having a list [aOpenIndexes] can we re-open the indexes on exit.

  Examples:
  ---------

  USE customer

  duphandle()

  Warnings:
  ----------
  Closes all indexes.

  Source:
  -------
  S_DUPH.PRG

 

SP_DELREC

DELREC()

  Short:
  ------
  DELREC() Dialog box to delete/undelete current record

  Returns:
  --------
  <nStatus> => If deleted 1, if undeleted-1, if no
  action 0

  Syntax:
  -------
  DELREC()

  Description:
  ------------
  Asks for delete/undelete record with menu prompt and
  then deletes/undeletes or not If current record is not deleted,
  prompt will be

       DELETE  NOACTION

  If current record is deleted, prompt will be

       UNDELETE  NOACTION

  Examples:
  ---------
   IF nChoice = 6
       nDelstat := DELREC()
   ENDIF

  Source:
  -------
  S_DELET.PRG

 

SP_DBF2ARRAY

DBF2ARRAY()

  Short:
  ------
  DBF2ARRAY() Returns an array of values for the current record

  Returns:
  --------
  <aValues> => an array of values in the current record

  Syntax:
  -------
  DBF2ARRAY()

  Description:
  ------------
  Returns an array of values for the current record,
  with the order of the array the same as the ordinal field
  order.

  Examples:
  ---------
   use customer

   a := DBF2ARRAY()            // store values
   for i = 1 to len(a)
     @0+i,0 get a[i]
   next

   read                        // edit them
   if AUPDATED(a)              // if they were updated from  the DBF values
     ARRAY2DBF(a)              // save them
   endif

  Source:
  -------
  S_DBARR.PRG