Friday, August 31, 2007

LOTUSSCRIPT CODE FOR FILE OPEN DIALOG BOX

Lotus script code to show file open dialog box to browse and select files in windows.

Sample Agent code with settings "Manually from the Actions menu" and "Run Once (@Commands may be used)"

Declarations event:
-----------------------
Declare Function NEMGetFile Lib "nnotesws" ( wUnk As Integer, Byval FileName As String, Byval Filter As String, Byval Title As String ) As Integer

Initialize event:
-----------------------

Sub Initialize

Dim strFileName As String*256
Dim strTitle As String
Dim strFilter As String

strFileName = ""
strTitle = "Please select the Excel file to be imported"
strFilter = "MS Excel Files*.xls" 'Filter is set to show only .xls files

' Show file dialog box till a Excel file is selected
Do
ErrorStatus=False
If NEMGetFile( 0, strFileName, strFilter, strTitle) = 0 Then
retval=Msgbox( "You have not selected an Excel file for processing. Do you want to exit ?",4+256,"Abort")
If retval=7 Then
ErrorStatus=True
Else
Exit Sub
End If
End If
Loop Until ErrorStatus=False

Msgbox strFileName

End Sub

Tuesday, August 21, 2007

DIALOG LIST DESIGN FOR WEB

A Javascript popup window design to simulate Notes Dialog list component.
Sample database design:

Screenshot1:
Parent form with PickSingle and PickMultiple fields


Screenshot2:
Single field selection dialog list.



Screenshot3:
Multiple field selection dialog list.





DIALOG LIST COMPONENT DATABASE DOWNLOAD LINK

Thursday, August 16, 2007

Javascript Folder Tree design

Folder tree design using javascript and DHTML. Lotus Notes view with parent child reporting id columns can be used as input parameter to build the tree.

Screenshot:


Design synapsis for the Sample database:

tree.js (page): Javascript to build the javascript
tree.css (page) : CSS for the folder tree design
JSDeptOrder (View) : Input view with 'Tree view contents as HTML' property enabled
TreeView (form) : Displays the folder tree



JS TREE DATABASE DOWNLOAD LINK