SP_CALCVALID

CALCVALID()

  Short:
  ------
  CALCVALID() Uses GETCALC() calculator function as a GET VALID
  clause

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

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

  Description:
  ------------
  This sets up the popup GETCALC() calculator 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 Calculator 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 := 10
   v2 := 10
   v3 := 10
   v4 := 10

   @10,10 get v1
   @11,10 get v2 when calcwhen(.f.)
   @12,10 get v3 valid calcvalid( {||v3>0}  )   // note the valid                                           // block
                                                 // IF V3 > 0, the calculator
                                                  // will not be called
   @13,10 get v4

   read

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

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

3 responses to “SP_CALCVALID

  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.