Friday, October 14, 2022

Tip of the Day: Manually Trigger Required Value Checks on Form Fields
Product.......: R:BASE X.5 and R:BASE X.5 Enterprise (Version 10.5)
Build.........: 10.5.5.11013 or higher
Sections......: Forms
Keywords......: Check Required Value, GETPROPERTY, Field, On Close

Did you know that, in addition to the right click context menu option, the GETPROPERTY command has been enhanced at the form level to trigger required value checks manually upon form fields?

The "Check Required Value" feature checks if a field has a value (not empty), and displays an error message or warning if the required value is not present. In the Form Designer, there are "required value" options that may be defined for database and variable controls within the right click context menu options. When enabled, a value for the field is checked when the form is closed.

. Check Required Value on Form Close - specifies the control is checked if it has a value in the form's "On Close" event . Required Value Error Message - specifies the message if a value does not exist for the control

In the event that the field is left empty, and the form is closed, the defined error message will appear.

With the GETPROPERTY command, an EEP may be defined as below, to manually trigger the required value check on the field, and close the form if values are present:

GETPROPERTY RBASE_FORM CheckRequiredValues 'vState'
IF vState = 'OK' THEN
   SAVEROW
   CLOSEWINDOW
ENDIF

If the required value is intended to be a warning, and also for easier development of several fields within a form, the below application property was introduced to display a warning dialog, with an "Ignore" button.

PROPERTY APPLICATION STRICT_VALUE_REQUIREMENTS ON

The default value is ON. When ON, the error dialog displayed. When OFF, the warning dialog is displayed.

The following online help page provides additional details, as well as the list of supported controls:
https://www.rbase.com/support/rsyntax/rbgx5/value-required-for-controls.html

Very Best R:egards,

Razzak.

R:BASE Technologies, Inc.
https://www.rbase.com


--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/956fe69b-4920-8521-504c-49fa368851e1%40rbase.com.

Reply via email to