John,
I'm not familiar with Helpdesk application but I did create something
similar for Asset Management (I think, based on your description of the
problem). In Asset Management I have a button which allows a user to copy
a Purchase Requisition (AST:PurchaseRequisition), including the details of
the requisition.
It works roughly as follows:
When the user clicks the "Copy Requisition" button, an active link opens a
new AST:PurchaseRequisition window in Submit mode and copies various values
from the instance of AST:PurchaseRequisition on which the button was
clicked. One of the values set in the new instance is a temp field
(zTmpCopyRequisitionID) which contains the Requisition ID of the
requisition being copied. The active link then closes the initial window.
Active Link = AST:PR_CopyRequisition
Execute On = Button/Menu Item = CopyRequisition_btn
Action 1 = Open Window - Window Type=Submit - Target Location=New -
Form Name=AST:PurchaseRequisition - Field Mapping=various
Action 2 = Close Window
Another active link is attached to the Load event of the
AST:PurchaseRequistion form. It runs on the condition that the temp
variable referred to above (zTmpCopyRequisitionID) is not null. If
zTmpCopyRequisitionID has a value, the active link calls an active link
guide (which actually copies the detail table values), resets
zTmpCopyRequisitionID to null, and refreshes the line item table.
Active Link = AST:PR_Initialize_CopyRequisitionLineItems
Execute On = Loaded
Action 1 = Call Guide - Guide Name=AST:PR_CopyRequisitionCreateLineItems -
table loop=LineItems_tbl
Action 2 = Set Fields - zTmpCopyRequisitionID=$NULL$
Action 3 = Change Field - Field=LineItems_tbl - Refresh Table Field
The detail table on the requisition form (LineItem_tbl - table property-
qualification) is conditionally populated from the line item form
(AST:ReqLineItem) based on either matching instance ids OR a non-null value
in zTmpCopyRequisitionID ie. it uses the requisition value in this field to
populate the table with all the line items matching this requisition id.
The active link guide loops through this table and creates a new line item
in AST:ReqLineItem (linked to the new requisition) for each line in the
table by repeatedly calling AST:PR_CopyRequisitionCreateLineItem.
Active Link = AST:PR_CopyRequisitionCreateLineItem
(called by guide)
Action 1 = Push Fields - Push Value To=AST:ReqLineItem - qualification=
(1=2) - If No Requests Match=Create a New Request - Fields=various (all the
column fields from LineItem_tbl)
After all the new line item records are created, zTmpCopyRequisitionID is
reset to null and the table is refreshed. This time, the table gets its
values from the line items linked to the new requisition, rather than from
the old requisition.
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the
Answers Are"