lotusscript - Why wont agent move to next line of text -
i creating agent go through list of lotus notes document id's read in text file. text file holds document id's line line , there no whitespace after each line , no lines after last entry. agent process first line in text file , not move onto next line. why this?
before coded loop going through view msgbox outputted every line.
sub initialize dim viewallcontracts notesview dim requestdoc1 notesdocument dim filenum integer dim filename string dim constatus variant dim strlinevalue string dim checkid variant set s = new notessession set db = s.currentdatabase filenum% = freefile() filename$ = "c:\contractidtocomplete.txt" open filename$ input filenum% set viewallcontracts = db.getview("contracts \ year") set requestdoc1 = viewallcontracts.getfirstdocument while not eof(filenum%) ' read until end of file. line input #filenum%, strlinevalue$ until requestdoc1 nothing checkid = requestdoc1.getitemvalue("concontractid") constatus = requestdoc1.getitemvalue("concontractstatus") if strlinevalue = cstr(checkid(0)) if cstr(constatus(0)) = "open" msgbox "found " & strlinevalue call requestdoc1.replaceitemvalue("concontractstatus", "completed") call requestdoc1.save(true, true) end if end if set requestdoc1 = viewallcontracts.getnextdocument(requestdoc1) loop wend close filenum% end sub
after first while loop requestdoc1 nothing. that's why nothing happens next lines text file.
put line
set requestdoc1 = viewallcontracts.getfirstdocument
after line
line input #filenum%, strlinevalue$
then work text file lines.
Comments
Post a Comment