Manage Learn to apply best practices and optimize your operations.

Using w.dialogBox in LotusScript

Are you tired of response documents with @command[compose]... in full screen ? Do you want something more user friendly? Try the NotesUiWorkSpace.DialogBox method class.

Are you tired of response documents with @command[compose]... in full screen ? Do you want something more user friendly? Try the NotesUiWorkSpace.DialogBox method class.

Put an action button with the next LS in a form:
---------------------------------------
Sub Click(Source As Button)
 Dim s As New NotesSession
 Dim db As NotesDatabase
 Dim w As New NotesUIWorkspace
 Dim doc As NotesDocument
 Dim res As NotesDocument
 Set db=s.CurrentDatabase
 Set doc=w.CurrentDocument.Document
 Set res=db.CreateDocument()
 Call res.MakeResponse(doc)
 'Oportunity to field initialization
 res.FORM="ProfessionalInfo"
 res.Desc=""
 res.office=" - Salta - Argentina"
 res.years=1
 If w.DialogBox("ProfessionalInfo",
True,True,False,True,False,False,
"ProfessionalInfo",res,True) Then
  'PresionÓ ok
  Call res.Save(True,False)
  doc.getfirstitem("historial").
Appendtotextlist(s.CommonUserName+" -
 "+Str(Today)+" - "+res.desc(0))
  Call doc.Save(True,False)
  w.CurrentDocument.Close
 Else 
  'Press Cancel
  Messagebox "New information not saved"
 End If
End Sub
-------------------------------------------
You will need a historial computed text multi 
line field in this form with "Document 
created at "+@Text(@Today) formula.

Create another response form 
"ProfessionalInfo" with the next fields:

Link (T Computed with $REF formula 
AND Hide for editing)
Desc (T)
Office (T)
Years (#)

without any action.

Then create one document for 
principal form and try your action button!

 

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Guillermo Villanueva. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our bimonthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close