From the Edge: Dynamically Changing EEPs and EEP Properties in Forms
Section: Forms and Form Designer
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.1 for Windows
Build: 7.1.71.303xx and higher
                                
R:BASE 7.1 for Windows now officially supports the PROPERTY command
to dynamically change the property of 78 form controls, properties
of the Form itself, as well as the corresponding Master/Slave tables.

One of the things you can also do is to change the EEP (Entry/Exit
Procedure) or even the properties of EEP defined for any of the 78
controls used in form.

First, let's understand the basics:

A typical EEP for any form control includes the following options:

Predefined Actions:
Add Row (0)
Add Row and Exit (1)
Delete Row (2)
Discard Row (3)
Discard Row and Exit (4)
Duplicate Row (5)
Exit (6)
Next Row (7)
Next Table (8)
Previous Row (9)
Previous Table (10)
Save Row (11)
Last Row (12)
First Row (13)
Save Row and Exit (14)
Refresh Current Table (15)

Stored Procedure (-2):
Custom Form Action (-3):
Custom External EEP (-1):
Custom Embedded EEP

Action Sequence (the order in which the form EEPs are executed):
1) Custom Embedded EEP (if defined)
2) Custom EEP (External File) -1
3) Stored Procedure -2
4) Custom Form Action -3
5) Predefined Actions (0 - 15)

Now that we understand basics, as well as the sequence in
which the form EEPs are executed, it is very easy to change
any of those options dynamically using the PROPERTY command.

Examples:

Let's say you would like to assign/change the Predefined
Action for 'Test Button' with Component ID 'CompID_PB'
to 'Discard Row and Exit'. You would use the following
PROPERTY command:

  PROPERTY CompID_PB EEP ' '
  PROPERTY CompID EEPNum 4
  RETURN

The first PROPERTY command tells the form to not use
Custom Embedded EEP. The second PROPERTY command assigns
'Discard Row and Exit' as the Predefined Action for Push
Button.

Now, let's say you wish to use the External EEP named
'MyCustomEEP.EEP' as the Custom External file. You would
use the following command:

  PROPERTY CompID_PB EEPNum -1
  PROPERTY CompID_PB EEP 'MyCustomEEP.EEP'
  RETURN

The first PROPERTY command tells the form that you'll be
using Custom (External) file. The second PROPERTY command
defines the actual name of external EEP.

To use Stored Procedure (if defined in the same database)
as an EEP, use the following PROPERTY command:

  PROPERTY <ComponentID> EEP ' '
  PROPERTY <ComponentID> EEPNum -2
  PROPERTY <ComponentID> EEP 'StoredProcedureName'
  RETURN

To use the Built-In Custom Form Action as an EEP, use the
following command:

PROPERTY <ComponentID> EEP ' '
PROPERTY <ComponentID> EEPNum -3
PROPERTY <ComponentID> EEP 'CustomFormActionCommandName'
RETURN

A PDF version of this technical document along with screen
shots and more is also available at:

From the Edge: http://www.razzak.com/fte (Powered by R:PHP)

Enjoy and make sure to 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