Need help Converting @functions to LS for submit and validation button
Posted on 2006-11-15
I would like some suggested solutions to the following problem.
I have an applcation that uses a 3rp party workflow engine in it ( See wfs.com )
The problem is that I need 2 buttons to complete any document.
The first does a Validation and saves it, and the second submits it to the Workflow Engine.
I would like a way to make sure that the Valdation is done before calling the submit button or as part of it.
Also, I will need to change the submit button everytime I get a newer version of the template ( quarterly ), so It must be something consistent
I have status fields that can be used if needed to notify when a Save is done, but more importantly I need a validation done during the Submit button action.
It looks like I will need to convert the formlas to LS and work from there.
Any suggestions welcome.
Validation code is in a script library.
Here is the code for both.
Sub Click(Source As Button)
Dim w As New NotesUIWorkspace
Set uidoc = w.CurrentDocument
Set S= New NotesSession
Set CurDb = S.CurrentDatabase
s_form=VLdoc.GetItemValue("StFormName_h_cc")(0) ' need field that is computed when composed with Form name
ii= ValidateFieldsviaForm( VLdoc, s_form, curdb)
If ii=False Then
' Continue=False ' not used
Call uiDoc.Save '
Submit button from WFS template
FIELD ACAction := "Submit";
Continue := @If(@IsDocBeingEdited;@Command([FileSave]);@True);
Querysave justs sets a status field
Dim doc As notesdocument
Dim s_key1 As String, S_key2 As String, d_stat As String , s_DeptLU As String, strFrmName As String , s_Ptype As String
Select Case Ucase ( d_stat)
Case "NO", "DRAFT" :
Call source.FieldSetText ( "t_DocStat", "OK" )
' End If
Case "OK" :
Thanks in advance !