Questions RE: first web DB

I am working on my first Web application and have questions, not as to the code per se, but more WHERE the different pieces of code are placed.I would like the form to do the following:

A. User fills out ‘Request’ form (10 fields).

B. User clicks ‘Submit’ button which:

  1. Validates the fields using JS (in JSHeader); and

  2. Opens a ‘Thank You’ form which shows them a confirmation # (which is simply the last 8 characters of the UNID) and has a ‘Print Confirmation’ button.

C. The ‘MoveReqNum’ field on the ‘Request’ form should increment by 1 from the last request.

My ‘Submit’ button:

@Command([FileSave]) ;

@URLOpen(“http://fmbdev01/MoveReq.nsf/MRConfirm?OpenForm&UNID=” + ParentID) ;

@Command([FileCloseWindow])

In WebQuerySave:

I call the following agent to increment the Request #:

Dim S As New NotesSession

Dim Db As NotesDatabase

Dim V As NotesView

Dim Doc As NotesDocument

Dim NumDoc As NotesDocument

Set Db = S.CurrentDatabase

Set V = Db.GetView( “ConfirmNum” )

Set Doc = S.DocumentContext

Gosub assignNumber

Exit Sub

assignNumber: '- assign the next available # to request

If Doc.IsNewNote Then

Set NumDoc = V.GetFirstDocument

Num& = NumDoc.ConfirmNum(0)

NewNum& = Num& + 1

NumDoc.ConfirmNum = NewNum&

Call NumDoc.ComputeWithForm( False, False )

Call NumDoc.save( True, True )

Gosub populateNumber

End If

Return

populateNumber:

Doc.MoveNum = NewNum&

Call Doc.Save( False, False )

End Sub

QUESTIONS:

  • I have another agent that grabs the UNID and parses out the last 8 characters but I can’t get it into my Confirmation form.

  • Do listbox fields require different JS than text fields? I’m just checking that they’ve selected something!

  • My WQS agent fails, stating “unsupported function…” (It works in the client).

  • My ‘Print Confirmation’ button is not working; it’s simply @Command([FilePrintSetup]).

I’ve been trolling the Forums for a few days and have found lots of help with the actual code I need but I can’t seem to find anything that tells me what goes where!

Thanks in advance.

Subject: Questions RE: first web DB

In general, program that needs to be executed on the user interface on the web needs to be coded using javascript. Of course the WebQuerySave and WebQueryOpen should be coded using Lotus Script.

Do some googling to find out how to print and validate listbox using javascript.