SP_CALCWHEN

CALCWHEN()

  Short:
  ------
  CALCWHEN() Uses GETCALC() calculator function as a GET WHEN
  clause

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

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

  Description:
  ------------
  This sets up the popup GETCALC() calculator for use
  in a GET WHEN clause. (the pre validation block). If a value is
  selected, it is assigned to the get. (if ESCAPE is pressed, it
  is no) The Calculator 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 GETCALC(). By setting it to
  True, the Calculator will pop up, and then the GET will also be
  put thorugh the normal get editor.

  Examples:
  ---------

   proc test

   v1 := 10
   v2 := 10
   v3 := 10
   v4 := 10

   @10,10 get v1
   @11,10 get v2 when calcwhen(.f.)   // calculator pops up  when
                                   // get is entered. No  direct
                                   // editing.
   @12,10 get v3 valid calcvalid(  {||v3>0}  )
   @13,10 get v4

   read

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

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

See also : CALCKSET(), GETCALC(), CALCKCLR(), CALCVALID()

 

3 responses to “SP_CALCWHEN

  1. Pingback: SP Get system Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

  3. Pingback: SP_GETCALC | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.