<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Profile documents in Notes</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/profile-documents-in-notes/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/profile-documents-in-notes/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 01:14:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: brooklynegg</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/profile-documents-in-notes/#comment-46365</link>
		<dc:creator>brooklynegg</dc:creator>
		<pubDate>Wed, 10 Jan 2007 09:16:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-46365</guid>
		<description><![CDATA[I agree with ramdisk. In R5 with his method (counter document) I somehow still ended up with some duplicates, but with R6 and upgraded servers, I no longer have this problem. If the app is multi-server, or replicated, you will want to hard code to one instance of the database, capture errors if users can&#039;t access that instance, and have a backend process to number records that don&#039;t get a new number from user action (replicate in later after a failed attempt).]]></description>
		<content:encoded><![CDATA[<p>I agree with ramdisk. In R5 with his method (counter document) I somehow still ended up with some duplicates, but with R6 and upgraded servers, I no longer have this problem. If the app is multi-server, or replicated, you will want to hard code to one instance of the database, capture errors if users can&#8217;t access that instance, and have a backend process to number records that don&#8217;t get a new number from user action (replicate in later after a failed attempt).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramdisk</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/profile-documents-in-notes/#comment-46366</link>
		<dc:creator>ramdisk</dc:creator>
		<pubDate>Wed, 10 Jan 2007 03:29:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-46366</guid>
		<description><![CDATA[I had the same problem some time ago using the proposed way: taking a view, seeking for the last doc and increment the counter. Although I used always the view.refresh method, double numbers were created from time to time, because you cannot control WHEN Notes actually refreshes the view! It depends on the server load and amount of documents in the database - in both terms it was heavy in my case! 
 
So I use now a &quot;counter document&quot;, where the last number is stored. During Querysave of the new doc, this counter doc is accessed, the number will be increased and stored again. This works without problems since 2 years, double numbers didn&#039;t show up anymore.
]]></description>
		<content:encoded><![CDATA[<p>I had the same problem some time ago using the proposed way: taking a view, seeking for the last doc and increment the counter. Although I used always the view.refresh method, double numbers were created from time to time, because you cannot control WHEN Notes actually refreshes the view! It depends on the server load and amount of documents in the database &#8211; in both terms it was heavy in my case! </p>
<p>So I use now a &#8220;counter document&#8221;, where the last number is stored. During Querysave of the new doc, this counter doc is accessed, the number will be increased and stored again. This works without problems since 2 years, double numbers didn&#8217;t show up anymore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kmpgmr</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/profile-documents-in-notes/#comment-46367</link>
		<dc:creator>kmpgmr</dc:creator>
		<pubDate>Thu, 04 Jan 2007 14:27:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-46367</guid>
		<description><![CDATA[Don&#039;t use a profile document.  Use a view sorted by your unique document number and then use the following function on your querysave event.  I called my field SeqNo.  You&#039;d of course revise this to be whatever field you determine.

If Source.IsNewDoc Then
	Call Source.FieldSetText(&quot;SeqNo&quot;, Cstr(SeqNo))
End If	

Function SeqNo As Double
	Dim db As NotesDatabase
	Dim vw As NotesView
	Dim sess As New NotesSession
	Dim doclast As NotesDocument
	Dim LastNo As Double
	Set db = sess.CurrentDatabase
	Set vw = db.GetView(&quot;vwSeqNo&quot;)
	Set doclast = vw.GetLastDocument
	If doclast Is Nothing Then
		SeqNo = 1
	Else
		LastNo = Cdbl(doclast.SeqNo(0))
		&#039;LastNo = Cdbl(Val(doclast.SeqNo(0)))
		SeqNo = LastNo + 1
	End If
End Function
]]></description>
		<content:encoded><![CDATA[<p>Don&#8217;t use a profile document.  Use a view sorted by your unique document number and then use the following function on your querysave event.  I called my field SeqNo.  You&#8217;d of course revise this to be whatever field you determine.</p>
<p>If Source.IsNewDoc Then<br />
	Call Source.FieldSetText(&#8220;SeqNo&#8221;, Cstr(SeqNo))<br />
End If	</p>
<p>Function SeqNo As Double<br />
	Dim db As NotesDatabase<br />
	Dim vw As NotesView<br />
	Dim sess As New NotesSession<br />
	Dim doclast As NotesDocument<br />
	Dim LastNo As Double<br />
	Set db = sess.CurrentDatabase<br />
	Set vw = db.GetView(&#8220;vwSeqNo&#8221;)<br />
	Set doclast = vw.GetLastDocument<br />
	If doclast Is Nothing Then<br />
		SeqNo = 1<br />
	Else<br />
		LastNo = Cdbl(doclast.SeqNo(0))<br />
		&#8216;LastNo = Cdbl(Val(doclast.SeqNo(0)))<br />
		SeqNo = LastNo + 1<br />
	End If<br />
End Function</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/8 queries in 0.012 seconds using memcached
Object Caching 297/298 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-19 02:39:00 -->