SP Get system Functions

 SMALLKCLR()    Clears GET-HOTKEY lookup combinations set up with SMALLKSET()
 POPUPKCLR()    Clears GET hotkey popups set up with POPUPKSET()
 PMREADER()     Creates specialized PLUS/MINUS get reader block
 SMALLKSET()    Sets up GET-HOTKEY lookup combinations using SMALLS()
 PICKREADER()   Creates specialized picklist reader block
 POPUPWHEN()    Allows use of a popup for a GET WHEN clause
 POPUPKSET()    Set a popup for hotkey access from a GET, with autoassignment
 POPUPVALID()   Allows use of a popup for a GET VALID clause
 CALENDVALID()  Uses GETDATE() popup calendar function as a GET VALID clause
 CALCKCLR()     Clears hot keys set by CALCKSET()
 CALCKSET()     Allows use of GETCALC() calculator in GETS
 SMALLWHEN()    Uses SMALLS() in a WHEN condition for a GET
 CALENDWHEN()   Uses GETDATE() function as a GET WHEN clause
 CALCWHEN()     Uses GETCALC() calculator function as a GET WHEN clause
 SMALLVALID()   Uses SMALLS() in a VALID condition for a GET
 CALCVALID()    Uses GETCALC() calculator function as a GET VALID clause
 RAT_READ()     Mouseable read
 GENVAL()       Generic VALID clause validation with message
 GENREADER()    Creates specialized user defined get reader block
 GETAKEY()      Gets intent of last keystroke
 SBREADER()     Creates specialized spacebar spinner get reader block
 ED_G_PIC()     Returns appropriate picture for getting a field
 CALENDKSET()   Allows use of GETDATE() calendar in GETS
 YNREADER()     Creates specialized Yes/No get reader block
 CALENDKCLR()   Clears hot keys set up by CALENDKSET()

 

SP_POPUPWHEN

POPUPWHEN()

  Short:
  ------
  POPUPWHEN() Allows use of a popup for a GET WHEN clause

  Returns:
  --------
  <lWhen> => when condition, get pre-validation

  Syntax:
  -------
  POPUPWHEN(bPopup,[lShowonUp],[lReturn])

  Description:
  ------------
  This sets up a popup in <bPopup> for use in a GET
  WHEN clause. (the pre validation block). If a value is returned
  from the popup, it is assigned to the get.

  <bPopup> is a codeblock that is evaluated. It is
  passed the current value in the get as a parameter.

  The popup function will pop up upon entry into a GET
  field.

  [lShowOnUp] Normally you wouldn't want this WHEN to
  occur if the user is using the up arrow, and if <lShowOnUp> is
  .f. (the default) it does not occur (the GET is just skipped)

  [lReturn] If set to False (the default) the GET is
  never actually edited, as the WHEN will always return .f., but it is
  assigned the value returned by the popup. By setting it to True,
  the Calendar will pop up, and then the GET will also be put
  through the normal get editor.

  Examples:
  ---------
   // these are codeblocks that do a popup (in this case, a  simple
   //call to msg, and a return of a value)

   b1 := {||msg("Character value"),"Bert"}
   b2 := {||msg("Logical value"),.t.}
   b3 := {||msg("Date value"),date()+100}

   v1 := space(10)
   v2 := .f.
   v3 := ctod("  /  /  ")

   @10,10 get v1 when POPUPWHEN(b1,.f.,.t.)
   @11,10 get v2 when POPUPWHEN(b2,.f.,.t.)
   @12,10 get v3 when POPUPWHEN(b3,.f.,.t.)

   READ

  Source:
  -------
  S_POPVW.PRG

 

 

SP_POPUPVALID

POPUPVALID()

  Short:
  ------
  POPUPVALID() Allows use of a popup for a GET VALID clause

  Returns:
  --------
  <lValid> => valid condition, get post-validation

  Syntax:
  -------
  POPUPVALID(bPopup,[bValid])

  Description:
  ------------
  This sets up a popup in <bPopup> for use in a GET
  VALID clause. (the post validation block). If a value is returned
  from the popup, it is assigned to the get.The popup function will pop
  up upon exit from the GET field.

  <bPopup> is a codeblock that is evaluated. It is
  passed the current value in the get as a parameter.

  [bValid]  - If you pass a validation codeblock, it
  will be checked first. If the GET is already valid, according to
  the codeblock, the popup will not be popped up. The codeblock
  must return a logical value.

  Examples:
  ---------

   // these are codeblocks that do a popup (in this case, a  simple
   //call to msg, and a return of a value)

   b1 := {||msg("Character value"),"Bert"}
   b2 := {||msg("Logical value"),.t.}
   b3 := {||msg("Date value"),date()+100}
   b4 := {||msg("Number value"),123}

   v1 := space(10)
   v2 := .f.
   v3 := ctod("  /  /  ")
   v4 := 0

   // these are added in as valid clauses to the gets. The <bValid>
   // param is a codeblock that checks for the value being empty.

   @14,10 get v1 valid POPUPVALID(b1,{||!empty(v1)})
   @15,10 get v2 valid POPUPVALID(b2,{||!empty(v2)})
   @16,10 get v3 valid POPUPVALID(b3,{||!empty(v3)})
   @17,10 get v4 valid POPUPVALID(b4,{||!empty(v4)})

   read

  Source:
  -------
  S_POPVW.PRG