Last active
August 29, 2015 14:01
-
-
Save joacim-boive/c2c7c7a60adfe7d801b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Public | |
Option Declare | |
Sub Initialize | |
Dim s As New NotesSession | |
Dim db As NotesDatabase | |
Dim vRequest As NotesView | |
Dim vMatchVacancy As NotesView | |
Dim veRequest As NotesViewEntry | |
Dim veMatchVacancy As NotesViewEntry | |
Dim rowIds As String | |
Dim key As String | |
Dim i As Integer | |
Dim count As Long | |
Dim hasEmptySlots As Boolean | |
Dim navMatch As NotesViewNavigator | |
Dim navRequest As NotesViewNavigator | |
Dim ve As NotesViewEntry | |
On Error GoTo handler | |
Set db = s.Currentdatabase | |
Set vMatchVacancy = db.getView("vMatchVacancy") | |
Set vRequest = db.getView("vRequest-list-match") | |
Call vRequest.refresh() | |
Call vMatchVacancy.refresh() | |
Set navMatch = vMatchVacancy.createViewNav() | |
Set navRequest = vRequest.createViewNav() | |
count = vMatchVacancy.Allentries.Count | |
i = 0 | |
' do not do AutoUpdates | |
vMatchVacancy.AutoUpdate = False | |
vRequest.AutoUpdate = False | |
' enable cache for max buffering | |
navMatch.BufferMaxEntries = 100 | |
' if we are not interested in the number of children, we can go a little faster | |
navMatch.EntryOptions = Vn_entryopt_nocountdata | |
Set veMatchVacancy = navMatch.GetFirst | |
Print "content-type: text;charset=utf-8;" | |
While ( i < count ) | |
hasEmptySlots = False | |
key = veMatchVacancy.Columnvalues(0) | |
Set veRequest = vRequest.Getentrybykey(key, True) | |
If(veRequest Is Nothing) Then | |
Print rowIds & veMatchVacancy.Columnvalues(1) & "," | |
End if | |
Set veMatchVacancy=navMatch.getNext(veMatchVacancy) | |
i = i + 1 | |
Wend | |
exitSub: | |
Exit Sub | |
handler: | |
MsgBox db.filepath & "agentMatchVacancys - " & Error & Chr(13) + "Module: " & CStr( GetThreadInfo(1) ) & ", Line: " & CStr( Erl ) | |
Print Error & Chr(13) + "Module: " & CStr( GetThreadInfo(1) ) & ", Line: " & CStr( Erl ) | |
Resume exitSub | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment