[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

3429.0. "Arg form set and return key" by USHS01::LIN (Terry Lin) Thu Oct 21 1993 15:50

    I have an argument form set and like to reprogram the Return key.  I am
    looking for a way to dispatch the Return function:
    
    	1. If not the last form, the next form is displayed when Return is
           keyed instead of exiting form set.
        2. If current form is the the last form, it exits when Return is keyed.
    
    Is there a way to implement this?  Thanks.   
    
T.RTitleUserPersonal
Name
DateLines
3429.1;;.CR;;SCOTTC::MARSHALLSpitfire Drivers Do It ToplessThu Oct 21 1993 18:3615
Hi,

You can "re-program" the RETURN key by adding a named data item for ;;.CR;;

For example:

;;.CR;;

GET OA$DISPLAY = "You hit RETURN" \ OA$FLD_STAY


Will display the message if the user hits reutnr, and leave them on the same
field.

Scott
3429.2OA$FLD_PAGE_FORWARDSCOTTC::MARSHALLSpitfire Drivers Do It ToplessThu Oct 21 1993 18:389
PS

In your specific case you'll want to use the OA$FLD_PAGE_FORWARD function on all
but the last form, then OA$FLD_DONE on the last form.

Alternatively, you don't need anything for the last form, as you're using the
'standard' action for the RETURN key there anyway!

Scott
3429.3Close but...USHS01::LINTerry LinThu Oct 21 1993 23:2117
    Scott,
    
    	I have tried your suggestion with:
    
        First form name data  ;;.CR;;
                              OA$FLD_PAGE_FORWARD
    
        Last formm name data  ;;.CR;;
    			      OA$FLD_DONE
    
        At the last form, with return, it brings me back to the first form
        and doesn't exit.  Is it a bug or someing I am missing?   Thanks.f7
    
        
    
     and without OA$FLD_DONE on the
    last form
3429.4What should the rest of your reply have said?SCOTTC::MARSHALLSpitfire Drivers Do It ToplessFri Oct 22 1993 12:146
>> and without OA$FLD_DONE on the last form...

Yes?  What were you going to say?  If you don't have the named data on the last
form, it should all work "as normal", are you saying that it doesn't?

Scott
3429.5Yes both caseUSHS01::LINTerry LinFri Oct 22 1993 16:218
    Scott,
    
    	I tried both with and without OA$FLD_DONE in the last form.  Both
        cases,  Return at the last form does not exit - it just brings the 
        first form.  Thanks.
    
    
    
3429.6This should do it!SCOTTC::MARSHALLSpitfire Drivers Do It ToplessMon Oct 25 1993 13:0021
Hi,

OK, I made a slight mistake; in a .FORM_SET the named data of the first form
applies to all subsequent forms, so ALL-IN-1 sees your original
OA$FLD_PAGE_FORWARD before the OA$FLD_DONE.

You have two options:

1) Don't make the forms be a form set, instead have them as individual forms. 
The named data for this could get quite tricky.

2) Keep the .FORM_SET, and add the following named data item to the first form
only (ie subsequent forms should not have any named data for .CR):

;;.CR;;

.IF OA$FORM_NAME EQS "last-form" THEN OA$FLD_DONE ELSE OA$FLD_PAGE_FORWARD

where last-form is the name of the last form in the form set.

Scott
3429.7Option 1USHS01::LINTerry LinWed Oct 27 1993 15:254
    .IF OA$FORM_NAME EQS "last-form" THEN OA$FLD_DONE ELSE OA$FLD_PAGE_FORWARD
    
    OA$FORM_NAME always returns first-form name in a form set.  It is just
    looping.  It seems that your first option is the only choice.
3429.8Another trySCOTTC::MARSHALLSpitfire Drivers Do It ToplessWed Oct 27 1993 18:1013
OK, how about this:

Make all the field names on the last form begin with some common sequence that
does not appear at the beginning of field names of any other forms in the form
set.  For example, make them all begin "XX_"

Then change the .IF to be:

.IF OA$FIELD_NAME = "XX_" THEN ...

(The single = means "BEGINS WITH")

Scott (rapidly running out of ideas! :-)