FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
RE: Duplicate Check Kevin Pettitt 14.May.09 02:18 PM a Web browser Domino Designer All ReleasesAll Platforms
dim session as new notessession
dim db as notesdatabase
dim invoicelookup as notesview
dim dupeinvoicedoc as Notesdocument
set db = session.currentdatabase
set invoicelookup = db.getview("name of invoice lookup view")
call invoicelookup.refresh 'be sure it is up to date
set dupeinvoicedoc = invoicelookup.getdocumentbykey(<invoicenumberjustentered>)
If not dupeinvoicedoc is nothing then
Messagebox "duplicate invoice number, try again"
you invoicelookup view would need at a minimum a single column sorted on invoicenumber, containing all existing invoices.