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_GETDATE

GETDATE()

  Short:
  ------
  GETDATE() Point and shoot calendar

  Returns:
  --------
  <dSelect> => date selected

  Syntax:
  -------
  GETDATE([dStart])

  Description:
  ------------
  Allows user to point to and select a date [dStart]
  optional date parameter to start with. If no date passed, system
  date is used.

  Examples:
  ---------
   set key -1 to GETDATE

  NOTES:
  -------
  See also CALENDWHEN(), CALENDVALID(), CALENDKSET()

  Source:
  -------
  S_GETDAT.PRG

 

SP_CALENDWHEN

CALENDWHEN()

  Short:
  ------
  CALENDWHEN() Uses GETDATE() function as a GET WHEN clause

  Returns:
  --------
  <lWhen> => when condition

  Syntax:
  -------
  CALENDWHEN([lShowonUp],[lReturn])

  Description:
  ------------
  This sets up the popup GETDATE() function for use in
  a GET WHEN clause. (the pre validation block). If a date is
  selected, it is assigned to the get. The Calendar 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 GETDATE(). By setting it to
  True, the Calendar will pop up, and then the GET will also be
  put through the normal get editor.

  Examples:
  ---------

   proc test

   v1 := date()
   v2 := date()+1
   v3 := date()+1
   v4 := date()+1

   @10,10 get v1
   @11,10 get v2 when calendwhen(.f.) // calendar pops up  when the
                                   // get is entered. No  direct
                                   // editing.
   @12,10 get v3 valid calendvalid( {||v3>date()} )
   @13,10 get v4

   read

  Notes:
  -------
  You might want to look at CALENDVALID() and
  CALENDKSET() for other options.

  Source:
  -------
  S_DATVW.PRG

 

SP_CALENDVALID

 CALENDVALID()

  Short:
  ------
  CALENDVALID() Uses GETDATE() popup calendar function as a GET
  VALID clause

  Returns:
  --------
  <lValid> => valid condition

  Syntax:
  -------
  CALENDVALID([bValid])

  Description:
  ------------
  This sets up the popup GETDATE() calendar for use in
  a GET VALID clause. (the post validation block). If a value is
  selected, it is assigned to the get. (if ESCAPE is pressed, it
  is not) The Calendar function will pop up upon exit from a GET
  field.

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

  Examples:
  ---------

   proc test

   v1 := date()
   v2 := date()
   v3 := date()
   v4 := date()

   @10,10 get v1
   @11,10 get v2 when calendwhen(.f.)
   @12,10 get v3 valid calendvalid( {||v3>date()}  )
                      // note the validation block
                      // IF V3 > date(), the calendar
                      // will not be called
   @13,10 get v4

   read

  Notes:
  -------
  You might want to look at CALENDWHEN() and
  CALENDKSET() for other options.

  Source:
  -------
  S_CALCVW.PRG

 

SP_CALENDKSET

CALENDKSET()

  Short:
  ------
  CALENDKSET() Allows use of GETDATE() calendar in GETS

  Returns:
  --------
  Nil

  Syntax:
  -------
  CALENDKSET(nKey,cProc,cVar,lAssign)

  Description:
  ------------
  Sets up a call to GETDATE() when key <nKey> is
  pressed while in proc or function <cProc> at variable <cVar>.

  If <lAssign> is True, the value returned from
  GETDATE() is assigned to the current get. Use CALENDKCLR() when
  done.

  Examples:
  ---------

  // this will pop up a the calendar when F2 is pressed while
  // on the get V2. The value will be assigned to V2.

  proc test
  local v1 := DATE(),  v2 := DATE()+1
  @10,10 get v1
  @11,10 get v2
  CALENDKSET(K_F2,"TEST","V2",.t.)
  read

  CALENDKCLR()  // clear it out

  Source:
  -------
  S_DATEK.PRG

 

SP_CALENDKCLR

CALENDKCLR()

  Short:
  ------
  CALENDKCLR() Clears hot keys set up by CALENDKSET()

  Returns:
  --------
  Nil

  Syntax:
  -------
  CALENDKCLR()

  Description:
  ------------
  Clears hot keys set up by CALENDKSET(). Always use
  this after using CALENDKSET()

  Examples:
  ---------
   // this will pop up a the calendar when F2 is pressed while
   // on the get V2. The value will be assigned to V2.

   proc test
   local v1 := DATE(), v2 := DATE()+1
   @10,10 get v1
   @11,10 get v2

   CALENDKSET(K_F2,"TEST","V2",.t.)

   read

   CALENDKCLR()  // clear it out

  Source:
  -------
  S_DATEK.PRG