<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C.M. Jackson .Net &#187; Lotus Notes</title>
	<atom:link href="http://www.cmjackson.net/tag/lotus-notes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cmjackson.net</link>
	<description>Web Design, Programming, Tutorials</description>
	<lastBuildDate>Tue, 13 Dec 2011 17:38:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Clearing the Client Version from the Lotus Notes Directory</title>
		<link>http://www.cmjackson.net/2010/01/20/clearing-the-client-version-from-the-lotus-notes-directory/</link>
		<comments>http://www.cmjackson.net/2010/01/20/clearing-the-client-version-from-the-lotus-notes-directory/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:00:07 +0000</pubDate>
		<dc:creator>Chris Jackson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Lotus Script]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.cmjackson.net/?p=315</guid>
		<description><![CDATA[With the latest version of Lotus Notes (8.5.1), you can now view the version of your clients by looking in the People -&#62; by Client Version view. One problem with this, however, is that your users will show each client they have logged in as. Over the years, you may accumulate many versions for each user. [...]]]></description>
			<content:encoded><![CDATA[<p>With the latest version of Lotus Notes (8.5.1), you can now view the version of your clients by looking in the People -&gt; by Client Version view. One problem with this, however, is that your users will show each client they have logged in as. Over the years, you may accumulate many versions for each user.</p>
<p>During an upgrade, you may wish to see what users are using the previous version of client against the ones who have the new version installed. But first, we&#8217;ll need to clean up the directory so we don&#8217;t see all this old version history.</p>
<p>To clean up these fields, you need to write an agent that will empty them for each selected person. This will allow you to run the clean up agent on only the users you wish to run it on.</p>
<p><strong>Writing the agent</strong><br />
Open up the pubnames.ntf template file in your Notes Designer. You&#8217;ll need to go to Code and double-click on Agents to see the current agents for the template.</p>
<p>We&#8217;ll create a new agent and give it a name. Below is the code for the agent. Copy and paste it in the Designer.</p>
<pre class="brush: vb;">
Option Public
Option Declare

Sub Initialize()

  'Declare.
  Dim s As New NotesSession
  Dim db  As NotesDatabase
  Dim dc As NotesDocumentCollection
  Dim doc As NotesDocument

  'Initialize.
  Set db = s.Currentdatabase
  Set dc  = db.Unprocesseddocuments
  Set doc = dc.Getfirstdocument()

  While(Not(doc Is Nothing))

    If (doc.Form(0) = &quot;Person&quot;) Then

      Call doc.Removeitem(&quot;ClntBld&quot;)
      Call doc.Removeitem(&quot;ClntDate&quot;)
      Call doc.Removeitem(&quot;ClntDgst&quot;)
      Call doc.Removeitem(&quot;ClntMachine&quot;)
      Call doc.Removeitem(&quot;ClntPltfrm&quot;)
      Call doc.Save(False, False, False)

    End If

    Set doc = dc.Getnextdocument(doc)

  Wend

End Sub
</pre>
<p>Now, after you refresh your names.nsf file, you can go to the Action menu and find your agent. Running the agent will only process those Person documents that you have selected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmjackson.net/2010/01/20/clearing-the-client-version-from-the-lotus-notes-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>String Replace Function For Lotus Script</title>
		<link>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/</link>
		<comments>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 21:06:29 +0000</pubDate>
		<dc:creator>Chris Jackson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Lotus Script]]></category>
		<category><![CDATA[strreplace]]></category>

		<guid isPermaLink="false">http://www.cmjackson.net/?p=71</guid>
		<description><![CDATA[Here is a handy function that I sometimes use in my Lotus Script programs.  '=============================================================================== ' +----------------------------------------------------------------------------+ ' &#124; Function: strreplace ' +----------------------------------------------------------------------------+ ' &#124; Accepts: src, the value to search for to replace. ' &#124;          dest, the value to replace with. ' &#124;          arg, the string to search within. ' +----------------------------------------------------------------------------+ ' &#124; Description: [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a handy function that I sometimes use in my Lotus Script programs. </p>
<pre class="brush: vb;">'===============================================================================
' +----------------------------------------------------------------------------+
' | Function: strreplace
' +----------------------------------------------------------------------------+
' | Accepts: src, the value to search for to replace.
' |          dest, the value to replace with.
' |          arg, the string to search within.
' +----------------------------------------------------------------------------+
' | Description:
' | Replaces all occurances of src with dest in the string arg.
' +----------------------------------------------------------------------------+
'===============================================================================
Public Function strreplace(Byval src As String, Byval dest As String,
Byval arg As String) As String

    'Declare variables
    Dim pos As Integer

    'Initialize
    pos = Instr(arg, src)

    'Loop through the string
    While (pos &gt; 0)
        arg = Left(arg, pos - 1) + dest + Mid(arg, pos + Len(src))
        pos = Instr(pos + Len(dest), arg, src)
    Wend

    'Return the replaced string
    strreplace = arg

End Function</pre>
<p>Here is an example of how to use the function:</p>
<pre class="brush: vb;">newString = strreplace(&quot;WORLD&quot;, &quot;World&quot;, &quot;Hello WORLD!&quot;)</pre>
<p>The <em>newString</em> variable would contain &#8220;Hello World!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

