[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

28.0. "how to pause a UDP for user input" by MAIL::SHAHNAM (Mehran Shahnam @STO) Tue Feb 18 1992 03:57

    Hi folks,
    
    Customer wants to know how you can pause a UDP for user input and have
    it continue the UDP after the input.  She doen't necessarily want to
    save the input in a variable, though.
    
    Please, any help is much appreciated.
    
    Rgds
    Mehran shahnam
    
    
    Also posted in wpsv30 notesfile.
T.RTitleUserPersonal
Name
DateLines
28.1.FX PROMPT ...AIMTEC::VOLLER_IGordon (T) Gopher for PresidentTue Feb 18 1992 04:1314
    Mehran,
    
    	Has your customer checked out the PROMPT function.
    
    	Eg. 
    			.
    			.
    		UDP commands
    		.FX PROMPT "text"
    		more UDP commands
    			.
    			.
    	
    Iain.	
28.2more infoMAIL::SHAHNAMMehran Shahnam @STOTue Feb 18 1992 14:5010
    Thanks for the quick reply.  She provided me with more info as to what
    she wants to do.  She does want to save the user input as a field
    value.  For example in the TM EV you can set a UDP up to automatically
    scan calendars with the only variable being date and time to start
    fields.  What she wants to do is to have those field be user input and
    the UDP after accepting those inputs will continue the automated task. 
    Does this make sense?  Again thanks for any feedback.
    
    Rgds
    Mehran
28.3ARGument formUTRTSC::BOSMANWe're just sugar mice in the rainWed Feb 19 1992 07:5412
    Hi,
    
    Create an ARGument form in which the user has to enter the required
    data. Then you can store this data in symbols.
    It is also possible to use the OA$PROMPT_TEXT symbol in combination
    with the PROMPT function, but using a form gives you more functionality
    for validation etc.
    
    The ARGument form can be invoked with .FX FORM myform from within the
    UDP.
    
    Sjaak.
28.4Further ideas...LARVAE::JORDANChris Jordan, Digital Services - Office Consultant, LondonThu Feb 20 1992 17:5910
    NO need to create a new form....
    
    Use the same form, fill in the required field from the UDP - data
    {TAB}{TAB} data etc etc.
    
    The put the user on the required field 
    	.FX OA$FLD_STAY field_name
    
    ten gather the data and do something  with it with the 
    .GET_FIELD and .PROCESS script directives...
28.5Burglarize !!!SCNDRL::HUNTWelcome back, Calvin & Hobbes !!!Thu Feb 20 1992 19:054
No need to do anything under than read some or all of the OA$CBI SCRIPT 
script mode scripts and see *exactly* how it'd done.

Bob Hunt
28.6UTRTSC::BOSMANWe're just sugar mice in the rainFri Feb 21 1992 08:263
    Seems lota work to me :-)
    
    Sjaak.
28.7Tell me more about pausingBERN01::MAURERFFAENMEM-E-Fatal enough memory errorFri Apr 10 1992 15:5730
    Hi all,
    
    I have a futher question on pausing a UDP to inquire an user input. On
    the following UDP, there is no problem on the first inquire(.get_field)
    but how can i stop the process after {pc find}, which produce a list
    depending of the /recognition qualifier?
    
    wp c{cr}{bs}{lf}
    .fu get #folder="temp"
    .fu put_field folder,#folder
    {tab}
    .get_field title
    .process
    {cr}
    
    {gold g}fc{cr}{bs}{lf}report
    {tab}
    {pc find}
    .FX OA$FLD_STAY title
    .get_field title
    .process
    
    {gold t}
    {enter}
    ...and so on
    .exit
       
    Thanks for any help and regards
    
    Felix
28.8Some suggestionsSHALOT::NICODEMWho told you I'm paranoid???Tue Apr 14 1992 16:4057
	This isn't necessarily going to be as easy as you want.  You have to
remember that whenever you're using a UDP, you're assuming that you can pretty
much predict exactly what's going to happen after each keystroke.  As soon as
you invoke something like recognition, you have the potential for a problem:

�    but how can i stop the process after {pc find}, which produce a list
�    depending of the /recognition qualifier?

	The problem is in how ALL-IN-1 responds to recognition.  When you use
the PC FIND key, for example, and you are on a field that has only one matching
value, ALL-IN-1 will never bring up form AUTO (or DOCRECOG, or whatever
recognition form is currently being called), or present you with a list.
Instead, it will simply fill in the field with the single, matching value.
However, if there is more than one match, form AUTO will be called in Select
mode, and you will see a list of matching values, and will be asked to choose
one of them.

	So now, in your UDP, you will need to know (among other things) if using
the PC FIND key *at that precise point* is going to call form AUTO, or simply
fill in the field.  Certainly, there are ways of determining this; you could,
for instance, look at OA$FORM_NAME or OA$FIELD_NAME from within your UDP to
determine whether you stayed on your own form or not.  Then you could
(conditionally) request user input.  (Keep in mind that form AUTO, though, is
only the *default* recognition form; others are called directly, such as
DOCRECOG in your example.)

	Your problem is that you are doing an unconditional .GET_FIELD on field
TITLE; but you don't know if you're going to be on field TITLE, or on form
AUTO, asking for a selection from the recognition list!

	Generally, UDPs are most useful when you have a precise, well-defined
order of events that will happen; this is not always the case with recognition.
However, merely for the sake of example, let's suppose that you know ahead of
time that your PC FIND will, indeed, generate a recognition list.  Then you
could modify your script as follows:

wp c{cr}{bs}{lf}
.fu get #folder="temp"
.fu put_field folder,#folder
{tab}
.get_field title
.process
{cr}

{gold g}doc{cr}{bs}{lf}report      <---  Note:  "doc", not "fc"
{tab}
{pc find}
.prompt                            <---  Here's where we anticipate having to
.process                                 select something from our list.

    .
    .
    .

	That should at least give you a start.  Hope it helps.

	F
28.9Check out OA$CBI directory for other complex UDPsSHALOT::LAMPSONIf you read this, you&#039;re too close!Tue Apr 14 1992 21:50132
        UDPs, as script-mode scripts, can get very complicated.  You can
        always use .JUDGE to evaluate the keystrokes and branch the logic
        accordingly.
        
        The UDP attached to the end of this note uses .JUDGE to handle
        user input.  It does not handle recognition, but I think it gives
        you the idea.  I have an example of recognition handling, but it
        is on tape backup and a printout.  What this other script does is
        branch to a GOLD_L handling section of the script within the
        .JUDGE.  The branch does something like this:
        
        .LABEL GOLD_L
        .PROCESS
        .IF OA$SRC_COUNT GE 2 THEN .GOTO GOLD_L_PROMPT
        .IF OA$SRC_COUNT EQ 1 THEN .GOTO GET_ONE
        .IF OA$SRC_COUNT EQ 0 THEN .GOTO PROCESS_THIS_FIELD_AGAIN
        
        In the GOLD_L_PROMPT section, it handles user input for the
        recognition form.  This includes pressing EXIT, pressing RETURN
        with nothing selected or pressing RETURN with a line number
        selected.  It can get very tedious handling all possible user
        keystrokes, so I often generate an error message if it is
        not a "standard" keystroke of some kind.
        
        _Mike
        
        The following UDP does a RS (Resource Scheduling) scan for me
        using the distribution list @RS_CONF which contains all conference
        rooms in our facility.
        
! ----------------------------------------------------------------------------
! Resource Scheduling SCAN procedure            Last Modification: 22-May-1989

! This UDP uses System Distribution List @RS_CONF
! It also prompts the user for the date to scan and the number of days
! It remembers the number of days to scan from one invokation to the next
! ----------------------------------------------------------------------------

! Only run from a MENU or INDEX form
.if oa$form_type nes "MENU" AND oa$form_type nes "INDEX" then .goto not_menu

! Save printer destination for others uses - don't change to TERMINAL
.fu get #mrl_save_ptr = $last_ptr_dest

! Go to SCan option in RS subsystem
{LF}rs sc{cr}

! Set the default number of days
.if $rs_udp_scan_days nes "" then -
   .fx get NR_DAYS = $rs_udp_scan_days -
 else -
   .fx get NR_DAYS = "1"

! Handle the date field
.label get_date
.fu get oa$display = "Enter the date to scan"\force
.get_field date

! And process the results

.judge "{*}{KEY 0}","{*}{PC EXIT}","{*}{GOLD K}","{*}{GOLD Q}"
  .process "{KEY 0}"
  .fu get oa$display = "Operation canceled by user"
  .goto exit_script
.end_judge
.judge "{*}{CR}","{*}{GOLD F}"
  .if oa$script_text eqs "" then get oa$script_text = "today       "
  .process oa$script_text "{CR}"
  .goto process_rs
.end_judge
.judge "{*}{TAB}"
  .process oa$script_text "{TAB}"
  ! possible error condition -- if we haven't changed fields, don't let
  ! UDP think we did
  .if oa$field_name eqs "NR_DAYS" then .goto ask_days else .goto get_date
.end_judge
.judge "{*}{BS}"
  .fu get oa$display = "You cannot use PREV FIELD here"\force
  .fu oa$fld_stay DATE
  .goto get_date
.end_judge

! Other conditions
.fu get oa$display = "Invalid keystroke for this UDK"\force
.fu oa$fld_stay DATE
.goto get_date

! Handle the number of days field
.label ask_days
.fu get oa$display = "Enter the number of days to scan"\force
.get_field NR_DAYS
.judge "{*}{KEY 0}","{*}{PC EXIT}","{*}{GOLD K}","{*}{GOLD Q}"
  .process "{KEY 0}"
  .fu get oa$display = "Operation canceled by user"
  .goto exit_script
.end_judge
.judge "{*}{CR}","{*}{GOLD F}"
  .if oa$script_text eqs "" then get oa$script_text = "1    "
  .fu get $rs_udp_scan_days = oa$script_text
  .process oa$script_text "{CR}"
  .goto process_rs
.end_judge
.judge "{*}{BS}"
  .process oa$script_text "{BS}"
  ! possible error condition -- if we haven't changed fields, don't let
  ! UDP think we did
  .if oa$field_name eqs "DATE" then .goto get_date else .goto ask_days
  .goto get_date
.end_judge
.judge "{*}{TAB}"
  .fu get oa$display = "You cannot use NEXT FIELD here"\force
  .fu oa$fld_stay NR_DAYS
  .goto ask_days
.end_judge

! Other conditions
.fu get oa$display = "Invalid keystroke for this UDK"\force
.fu oa$fld_stay NR_DAYS
.goto ask_days

.label process_rs
@RS_conf{CR}
I{CR}{cr}
{LF}terminal{cr}    

.label exit_script
.fu get $last_ptr_dest = #mrl_save_ptr
.exit

.label not_menu
.fu get oa$display = "You must be on a menu to use this UDK"\force
.exit
28.10I'v got itBERN01::MAURERFFAENMEM-E-Fatal enough memory errorWed Apr 15 1992 16:4522
    I found a solution for my problem, from .8, the second part of my UDP
    looks so now:
    
    {gold g}doc{cr}{bs}{lf}report
    {tab}
    {pc find}
    .fx prompt "Which document do you want? Please choose a line number: "
    .get_field DOCNUM/TITLE
    .process
    {cr}
    {gold t}
    {enter}
     
    This works fine in all the case I have tested and can be used in other
    places by replacing fields names in .get_field statment.
    
    I have not yet read all the .9 but it seems to have a lot of intresting
    stuff.
    
    Thanks all for your help.
    
    Felix
28.11HELP WITH A UDPNEWOA::WILSON_SFri Jan 08 1993 11:3414
    Hi,
    
    I wonder if somebody can help me with a UDP.  Under version 3.0 of
    ALL-IN-1 inviting remote addressees to meetings (Time Management)
    results in mails with a status of NOTED.  These mails cannot be
    deleted.
    
    I can do a index of all mails with a status of NOTED and get the fixer
    number.  What I then want to do is to use 'DOCDB folder' and enter each
    fixer number to change the 'Deleteable' status.
    
    Thanks in advance
    
    Sarah  
28.12IOSG::MAURICEBecause of the architect the building fell downFri Jan 08 1993 11:5711
    Hi,
    
    To change the deletable status I recommend you use:
    
    	CABINET RESET_DELETE doc_sym, OA$Y
    
    rather than struggle with fixers.
    
    Cheers
    
    Stuart