Hello All,
Let me explain in detail.
Form Name → “ShowBOM” form.(Generate HTML for all fields is set.)
In which I have 2 fields -
-
$$SelectDoc->Text->Editable(allow multiple)
-
SaveOptions->Text->Com when Comp - Value=“0”
Both are hidden…
An Embedded View (HTML)
- SelectPart (Name of the View)
A Button
- ShowBOM - Type Submit
Now I have written an agent “ProcessDocs” which I am calling from WebQuerySave event in a form.
In which I am reading the selected Documents of a form field “PartNo” from embedded View. Later in a agent I am Processing the same by putting HTML Tags which is working properly. and Dynamic field called “BOMId” which is a type editable text. And also generating field called “Qty” which is editable text and displaying beside each PartNo …those I have selected. Everything is working properly…
And also generated a Button called “Save” from an agent.
Now My problem is When I click on “save” The Contents “BOMId”, all “PartNo” and All “Qty” should Save in a form called “FinalBOM”
In which I have
-
BOM_Id - Editable
-
PartNo - ListBox - Editable (Allow Multiple)
-
Qty - ListBox - Editable (Allow Multiple)
I am no getting anyway to save these generated values from a agent…To save in a “FinalBOM”
form. How do I achieve this problem?
Thanks for your Suggestions inadvance…
The agent code is here…which I have Done.
=============================================
Sub Initialize
Dim session As New NotesSession
Dim docSubmit As NotesDocument
Dim varDocUNID As Variant
Dim docSelected As NotesDocument
Dim db As NotesDatabase
'Get the document that was submitted with the embedded form
Set docSubmit = session.DocumentContext
Set db = docSubmit.ParentDatabase
Print " <HEAD>"
Print " </HEAD>"
Print |<BODY>|
'Setup the web page's font
Print |<Font Face="Verdana" size="2">|
Print "<H3><center>Bill of Materials</center></H3>"
'Get the field that contains the UNID's of the selected documents (array)
varDocUNID = docSubmit.GetItemValue("$$SelectDoc")
'Make sure that at least one document was selected
If varDocUNID(0) = "" And Ubound(varDocUNID) = 0 Then
Print "No documents were selected.<BR>"
Else
Print | <font face="Verdana" size="1">BOM ID : </font><input type="text" name=docSelected.PartNo(0) size="20">|
Print "<BR><BR>"
Print | <TABLE border=".5" bordercolorlight="#000000" align="left" width="50%" cellpadding="5">|
Print |<TR>|
Print |<TH bgcolor="#F3F3F3"><font face="Verdana" size="1">Part No</font></TH>|
Print |<TH bgcolor="#F3F3F3"><font face="Verdana" size="1">Quantity</font></TH>|
Print |</TR>|
'Loop through all the documents that were selected
Forall unid In varDocUNID
Set docSelected = db.GetDocumentByUNID(unid)
If Not docSelected Is Nothing Then
Print |<TR>|
Print |<TD bgcolor="#EAF2FF" align="center"><font face="Verdana" size="1">| & docSelected.PartNo(0) & |</font></TD>|
Print |<TD bgcolor="#EAF2FF" align="center"><font face="Verdana" size="1"> <input type="text" name="Qty"+docSelected.PartNo(0) size="6" ></font></TD>|
Print |</TR>|
End If
End Forall
Print "</TABLE>"
Print "</BODY>"
'Print the total of the selected orders
Print "<BR><BR>"
End If
'Add a button to return to the view
Print "<BR><BR>"
<input type="submit" value='Save' onClick=submit();></Center>|
Print |</Font>|
End Sub
===============================================
regards
Sanjay S.Patil