Modified Script: Allows for selection of Professional and Job Number:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim ws As New NotesUIWorkspace
Dim UserDbColumn As Variant
Dim JobDbColumn As Variant
UserDbColumn = Evaluate(|@Trim(@Unique(@DbColumn("";"":"";"(TimeByJobSel)";1)))|)
GetValue = ws.Prompt(4, "Professional", "Select Professional", "",UserDbColumn)
If GetValue = "" Then
Messagebox "Operation Canceled" ,,"No Professional Selected."
Exit Sub
End If
JobDbColumn = Evaluate(|@Trim(@Unique(@DbColumn("";"":"";"(TimeByJobSel)";2)))|)
GetValue1 = ws.Prompt(4, "Client Matter", "Select Job", "",JobDbColumn)
If GetValue1 = "" Then
Messagebox "Operation Canceled" ,,"No Job Selected."
Exit Sub
End If
Dim NewFormula As String
NewFormula = |SELECT Form = "Timeslip" & From="|& GetValue & |" & JobNumber= "|& GetValue1 & |" |
Set uiview = ws.CurrentView
Set view = uiview.View
view.SelectionFormula = NewFormula
Call ws.ViewRebuild
End Sub
|