[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION 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


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson