[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

88.0. "Need more than one enterable field on ENTRY form" by EVENS::NUTKINSM (Martin Nutkins) Mon Feb 24 1992 22:21

I am trying, with great difficulty, to get the following ENTRY form to display 
like any other ENTRY form during record Creation :-

                       Circulation List

Post Reference :   AAAAAA

    First Name :   Martin

     Last Name :   Nutkins


What is unusual about this form is that the POST REFERENCE field is the only
field stored in the data file, the other two fields are display only fields 
whcih mapped onto another form. I have an entry form with a .FILE definition :-

              Form     ONE_ENTRY                                          
;;.TYPE;;
ENTRY /MODE=update
;;.FILE;;
ONE.DAT,POSTREF
;;POSTREF;;
/put_save=#POSTREF

and than a second entry form, which maps onto ONE_ENTRY but with some 
additional fields :-

              Form     ONE_ENTRY_EXTRA
;;.TYPE;;
ENTRY /MODE=UPDATE/DATA=ONE_ENTRY/KEY=POSTREF
;;POSTREF;;
/PUT_SAVE=#POSTREF
;;DISP_FIRST;;
/GET_SAVE=POST_ENTRY.FIRSTNAME[#POSTREF]
;;DISP_LAST;;
/GET_SAVE=POST_ENTRY.LASTNAME[#POSTREF]

My MENU form has the normal syntax for creation ie :-

;;OA$_MO_CREATE;; C
FORM ONE_ENTRY_EXTRA/MODE=ADD\IFEXIT


When I create a record, after filling in the key field, I am prompted to 
"Enter data for new record          ...Press RETURN"   which I don't really
want.  After pressing RETURN I am then prompted as expected 
"Press RETURN if entry is  complete, or EXIT to correct".

If I press RETURN it works fine, but if I want to cancel the entry and press 
EXIT I just get the same message back.  The only way out of this loop is to 
accept the entry and press RETURN.

I understand that this may be a limitation with ALL-IN-1 and that I should have 
a minimum of two fields.  I have tried adding a DUMMY field to the
 ONE_ENTRY_EXTRA form and this seems to cure the 'loop' problem, providing this
field does not have the DISPLAY ONLY attribute set, but I don't want the user to
have to enter anything into this field.

Adding /PRE='OA$MSG_PURGE to this dummy field got ride of the "Enter data for
new record" prompt. 

I then thought that I might be able to test the input to field DUMMY for RETURN
or EXIT and force the appropriate actions using the /POST field qualifier, but
I have have not been able to get this to work.

Any suggestions on overcoming this problem gratefully received.


Thanks

Martin

T.RTitleUserPersonal
Name
DateLines
88.1Use an ARG and WRITE ADD instead?BUFFER::VICKERSWinners take action not keep scoreMon Feb 24 1992 22:5712
    Martin,

    I don't know of any really good ways to change the messages created by
    the ENTRY form processing.  I believe that you might be better off
    using ONE_ENTRY_EXTRA as an ARG form and add the record via a WRITE ADD
    or DATA_FILE function following the IFEXIT in the menu named data.

    You'd want to have a /INVALID qualifier on the POSTREF field to be sure
    that the new name is not already on file.

    Hope this helps,
    don
88.2ARG form!SCOTTC::MARSHALLPearl-white, but slightly shop-soiledTue Feb 25 1992 11:3011
I agree with .1 that ONE_ENTRY_EXTRA should be an ARG form.

The point of an ENTRY form is that ALL the fields on it map to (and are usually
the definition of) the structure of records in a single file.  As this is not
what your form is doing, it shouldn't be an entry form.

But taking a step back, I don't see why you need the two files; perhaps you
could explain what you wish to do, which might make it easier to suggest a
solution to your problem.

Scott
88.3/DATA for different layout'sUTRTSC::BOSMANWe're just sugar mice in the rainTue Feb 25 1992 11:5610
    Hi,
    
    I disagree. Using the /DATA qualifier can let you use several layout's
    and they surely don't have to match. ALL-IN-1 determines which fields
    match by comparing field names and processes the form accordingly.
    
    So you can have an ENTRY form with fields on it that do not exist as a
    field in the record.
    
    Sjaak.
88.4ENTRY forms happen in two phasesIOSG::SHOVEDave Shove -- REO-D/3CTue Feb 25 1992 13:3915
    Scott's sort-of right.
    
    ENTRY forms are processed in two phases (see AP Guide) - the first
    phase handles the key processing, the second the (non-key) data fields.
    
    What you've done is to create a situation where the second phase has
    nothing to do. Hence the confusion.
    
    ENTRY forms don't work properly unless there's at least one field which
    isn't a key (or part of one).
    
    I think you'll have to use an ARG form with WRITEs to write the data to
    the file.
    
    D.
88.5UTRTSC::BOSMANWe're just sugar mice in the rainTue Feb 25 1992 14:145
    It would be nice if that kind of information will be documented ;-)
    See Page 8-6 of the Guide. It only tells us to specify the key field
    with /KEY.
    
    Sjaak.
88.6It sort-of is documentedIOSG::SHOVEDave Shove -- REO-D/3CTue Feb 25 1992 16:363
    It's documented, in a way, in the flow chart at the end of chapter 8.
    
    D.