I have an eep that runs upon entry to variable fields.  It
creates a choose box with appropriate entry options for that
field.

Field Settings/ Entry Exit Procedures/On Entry into:
FFldName.eep  [NOTE:  no USI xx  required because
form_field_name provides the unique operator.]

The FFldName.eep is essentially:

CLEAR VAR fvFormFieldName
SET   VAR fvFormFieldName    TEXT =
(CVAL('Form_Field_Name'))

SWITCH (.fvFormFieldName)
  CASE 'NULL'
  CASE '[ESC]'
    SET VAR vSwitch2 = 0
    BREAK

  CASE 'the name of your variable'
    SET VAR vSwitch2 = 1
    BREAK

  CASE 'the name of your next variable'
    SET VAR vSwitch2 = 2
    BREAK

 DEFAULT
 SET VAR vSwitch2 = 0
    BREAK

ENDSW

IF vSwitch2 = 0 THEN
GOTO finish
ENDIF

IF vSwitch2 = 1 THEN
Do something
ENDIF

IF vSwitch2 = 2 THEN
Do something else
ENDIF

LABEL finish
RECALC VARIABLES
RETURN  -- or QUIT TO xxxxx.rmd

Randy Peterson

----- Original Message -----
From: "Alastair Burr" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 3:06 AM
Subject: [RBASE-L] - Re:
CriteriaForMyUnstablenessWithR:Base6.5++Build 1.862


> Ben,
>
> Thanks for your suggestions.
>
> Way back when I first created the form I tried something
along the lines of:
>
> SET V zFldNm = (CVAL('form_field_name'))
>
> but could never get a value in the variable.
> I've just (quickly) tried it again and I still can't get
any value - it
> stays null.
>
> R:Syntax says:
>
> FORM_FIELD_NAME returns the name of the current field
(column or variable
> only) in a form.
>
> so I think I assumed way back that buttons didn't work
with this sort of
> code. If I could get a value then your AlsEep.eep example
would work fine
> (and be a better method in my view).
>
> Later today I'll create a new test form and see if I can
get CVAL to work on
> a button rather than a quick copy of my real form.
>
> Thanks again,
> Regards,
> Alastair.
>
>
> ----- Original Message -----
> From: "Ben Petersen" <[EMAIL PROTECTED]>
> To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
> Sent: Sunday, January 12, 2003 11:39 PM
> Subject: [RBASE-L] - Re: Fw: [RBASE-L] - Fw: [RBASE-L] -
Re:
> CriteriaForMyUnstablenessWithR:Base6.5++Build 1.862
>
>
> > > Any thoughts on what systems? Is there something
common?
> >
> > I haven't been able to run down the similarities. The
clients are
> > remote and incapable of describing their equipment. Tech
support
> > ranges from excellent to hostile.
> >
> > > I'll try some other commands in place of the pause but
> > > I tend to have blank lines in my code to simplify the
layout
> > > so I doubt they'll make any difference (but I'll still
try!).
> >
> > fwiw my code has lots of white space also.
> >
> > > I tried originally to run the eep as ascii but I get
the error that it
> > > is not a run command.
> >
> > The field that specifies the eep should only contain the
file name.
> > The file itself should look like this:
> >
> > > SET VAR vSelName = 'GENERAL'
> > > EXITFORM
> > > RETURN
> >
> > No $Command; No Block Name
> >
> > > There's almost a dozen of these in the eep and
> > > nothing more (bar some comments at the end
> > > after the last return)
> >
> > Do I understand... a dozen buttons that execute
different command
> > blocks? I have no idea if this is better... _maybe_
easier to
> > maintain (Same eep for all 12 buttons):
> >
> > --AlsEep.eep
> > -------------------
> >
> > SET V zFldNm = (CVAL('form_field_name'))
> >
> > Switch (.zFldNm)
> >
> >   Case 'General'
> >     SET VAR vSelName = 'GENERAL'
> >     Break
> >
> >   Case
> >
> >     Break
> > ....
> > EndSw
> >
> > ExitForm
> > Return
> > ------------------------
> >
> > Of course if vSelName is always the text on the button
you can
> > forget the switch block and:
> >
> > SET V vSelName = (CVAL('form_field_name'))
> > ExitForm
> > Return
> >
> > Ben Petersen
>
>
>

Reply via email to