Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

Temperamental coding - trying to block email addresses
Marcia Vigar 5.Jan.04 08:02 AM a Web browser
Domino Designer -- LotusScript Release 4 Windows NT

We've been asked to look at boocking specific email addresses (because of recent UK legislation)

I've created a database of 'blocked' email addresses, and then put coding into the Memo form, SendTo field, Exiting event, which will prompt users if any of the names are on the 'blocked' database. I've pasted in the code below.

So far so good, it works fine BUT after a while it fails to function (debug shows that the Evaluate is returning nothing). I can only get it to work again by modifying the code a little and re-saving it.

Can anyone help me? I'm mystified as to why it fails.
Thanks in advance
Marcia
marcia70 at btinternet.com

Sub Exiting(Source As Field)
'now check the names in the SendTo against the Blocked list
Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Set uidoc = uiw.currentdocument
Set doc = uidoc.document
Dim item As Variant
Set item = doc.getfirstitem("SendTo")
Dim server As String
server = "our_server"
Dim temp As String
b=0 'mails blocked flag
Forall v In item.values
If Instr(v,"@") Then ' ie don't check internal names
doc.tmpfield=v 'set in the context of the doc for the dblookup
result=Evaluate({@dblookup("Notes":"NoCache"; server :"Blocked.nsf";"Main";tmpfield;"2")},doc)
If Isarray(result) Then
temp = temp & Chr$(10) & v
b=1 'set the blocked flag
End If
End If
End Forall
If (b>0) Then
'now set focus back to field
wqer= Messagebox("Recipient(s) " & temp & Chr$(10) &" on Blocked list", 0+16+0+0, "BLOCKED NAME(S) IN SEND TO FIELD:")
Call uidoc.gotofield("SendTo")
End If
End Sub




Temperamental coding - trying to bl... (Marcia Vigar 5.Jan.04)
. . RE: Temperamental coding - trying t... (James Ogilvie 5.Jan.04)
. . RE: Temperamental coding - trying t... (James Asquith 5.Jan.04)
. . RE: Temperamental coding - trying t... (Rod Whiteley 5.Jan.04)
. . . . RE: Temperamental coding - trying t... (Marcia Vigar 6.Jan.04)
. . . . . . RE: Temperamental coding - trying t... (Rod Whiteley 6.Jan.04)
. . . . . . . . RE: Temperamental coding - trying t... (Marcia Vigar 7.Jan.04)
. . . . . . . . . . RE: Temperamental coding - trying t... (Rod Whiteley 7.Jan.04)
. . RE: Temperamental coding - trying t... (Henry Kaye 5.Jan.04)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow