At 12:09 AM 5/29/2008, TOM HART wrote:

I have a form with a scrolling region and want to check a
currency value upon exiting a row.  I do not want a null
or zero value.  Currently I use a rule to check if the
value is less than 1.  This works, but does a rule slow
down a multi-user environment, if so I'm sure there is a
better way.

Tom,

GETPROPERTY <CurrencyColumnCompID> TEXTVALUE 'varname' is
one of the techniques to validate a value when existing a
row or leaving a field.

Here's how:

-- A very simple example
-- start here ...
CLEAR VAR vCheckValueTxt, vCheckValueCur
SET VAR vCheckValueTxt TEXT = NULL
SET VAR vCheckValueCur CURRENCY = NULL
GETPROPERTY <CurrencyColumnCompID> TEXTVALUE 'vCheckValueTxt'
SET VAR vCheckValueCur = (FLOAT(.vCheckValueTxt))
IF vCheckValueCur > 0.00 THEN
   -- All good ...
   -- Do what you need to do here ...
ELSE
   PAUSE 2 USING 'Amount must be greater than 0.00' ICON STOP
   RETURN
ENDIF
-- end here ...

That's all there is to it!

Have fun.

Very Best R:egards,

Razzak.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to