[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

439.0. "index form problem" by HAND::BUGDEN (Steve Bugden) Wed Apr 08 1992 18:53

I have a customisation which worked OK on ALL-IN-1 2.4 but which I can't get 
to work on 3.0. 

The code (which I've included below) allowed users to forward selected 
attachments of a document/message. I've put the named data in the 'Index of 
attachments' form 'FC$IA$INDEX' of 3.0 and changed the it to use the *IA$INDEX 
phantom dataset. This allows me to forward an attachment successfully. When I 
return to the 'FC$IA$INDEX' form and use the up or down arrow key the 
attachments displayed disappear and I am left with an empty index form.

I understand that the cabinet functions have undergone a fairly major rewrite 
for 3.0 and wonder if they interfere with the phantom dataset. Of course, I 
can re-do the BIND but I lose the selections and the attachment pointed to.

Can anybody suggest a work around for this problem, I've included the named 
data and script below.

Regards, 

Steve.



;;OA$_MO_FORWARD;;

GET #ASC_SAVED_DOC = OA$CURMES\
GET #ASC_FORWARD_KEY = *IA$INDEX.%KEY[OA$SCROLL_KEY]\
GET #ASC_FORWARD_TITLE = *IA$INDEX.DTITLE[OA$SCROLL_KEY]\
CAB FILE_ATTACHMENT
 ,#ASC_FORWARD_KEY,"ASC_FORWARD_FOLDER",#ASC_FORWARD_TITLE\
CAB SELECT "ASC_FORWARD_FOLDER",,#ASC_FORWARD_TITLE,#ASC_FORWARD_MESSAGE\
GET #ASC_ATTRIBUTES_PARAMETER = #ASC_FORWARD_MESSAGE\
DO ASC_FORW_KEEP_ATTRIBUTES\
CAB CURRENT #ASC_FORWARD_MESSAGE\
XOP "~~FORWARD_MESSAGE~~"\
.IF OA$FORM_DISPOSE EQ 0
 THEN CAB DELETE_DOCUMENT #ASC_FORWARD_MESSAGE\\
      GET OA$CURMES = #ASC_SAVED_DOC\\
      CAB CURRENT OA$CURMES\

;;~~FORWARD_MESSAGE~~;;

MAIL GET #ASC_FORWARD_MESSAGE\
MAIL FORWARD/NOSEND\
IFEXIT\
.FX IFNOTSTATUS\\XOP "~~CHECK_OVER_QUOTA~~"\\GET OA$STATUS=0\
IFSTATUS\
CLOSE_PRIOR\
OA$SCL_REFRESH\
XOP "~~ASK_SEND_NOW~~"\
CAB DELETE_DOCUMENT #ASC_FORWARD_MESSAGE\
GET OA$CURMES = #ASC_SAVED_DOC\
CAB CURRENT OA$CURMES

;;~~ASK_SEND_NOW~~;;

OA$MSG_PURGE\
YESNO_PROMPT OA$_EM_PROMPT_SEND_NOW\OA$FLD_STAY\
.IF OA$PROMPT_TEXT == OA$Y
 THEN MAIL SEND ELSE GET OA$DISPLAY = OA$_EM_FILED_IN_CREATED


;;~~CHECK_OVER_QUOTA~~;;

CHECK_DISKQUOTA/NOPROMPT\
IFNOTSTATUS\
GET OA$DISPLAY = OA$_DSKQUOEXC\
FORM OA$VIEW_MESSAGES\
GET OA$STATUS = 0



Script follows :



!ensure that original mail message is current
CAB CURRENT #ASC_SAVED_DOC

!select attachment referred to by key retrieved from oa$scroll and
!add each required attribute from the attributes of the attachment

FOR CAB$ATTACH WITH .VALUE = #ASC_FORWARD_KEY -
 DO CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "TYPE", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["DTYPE"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "SUBJECT", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["SUBJECT"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "FROM_ADDRESS", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["FROM_ADDRESS"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "AUTHOR", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["DAUTHOR"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "CREATED", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["DCREATED"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "TITLE", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["DTITLE"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "DELIVERED", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["DELIVERED"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "FROM_DEPT", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["FROM_DEPT"]\\ -
 CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "FROM_TEL_NO", -
                        CAB$ATTACH_ATTRIBUTES.VALUE["FROM_TEL_NO"]

!for same attachment, loop through the values for "to" and "cc"
CAB CURRENT #ASC_SAVED_DOC

FOR CAB$ATTACH WITH .VALUE = #ASC_FORWARD_KEY DO -
 FOR CAB$ATTACH_ATTRIBUTES WITH .KEY == "TO" DO -
    CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "TO", .VALUE\\ -
 FOR CAB$ATTACH_ATTRIBUTES WITH .KEY == "CC" DO -
    CABINET ADD_ATTRIBUTE #ASC_ATTRIBUTES_PARAMETER, "CC", .VALUE

.EXIT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!Author : Jane Herlihy
!Date   : January 20th 1990
!
!Description : When an attachment of a mail message is filed, it loses most of
!its attributes.  This is particularly important in the case of a mail type
!attachment (as opposed to a document type) which won't be displayed with it's
!message header.  This script retrieves the attributes from the attachment and
!adds them to the newly filed attachment.
!
!Please describe any modifications here :

T.RTitleUserPersonal
Name
DateLines
439.1What you need is thereIOSG::MAURICEIOSG ain't a place to raise a kidWed Apr 08 1992 19:0812
    Re .0
    
    The underlying data set CAB$ATTACH works off the current document. If
    you change the current document then you lose it. This implies that you
    have to save context and restore it when you return. If you look at the
    other options on this form then you will see that they do that. There
    are XOPs on the form, X_SETUP and RESELECT that you should be able
    to use.
    
    Cheers
    
    Stuart