 




<?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: Displaying database and using common names</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: brucewayne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/#comment-82373</link>
		<dc:creator>brucewayne</dc:creator>
		<pubDate>Wed, 13 Oct 2010 14:28:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-82373</guid>
		<description><![CDATA[To catch the connected user name in script, you use (likle Ldelincoln said) the CommonUserName method of Session class =&gt; 
&lt;pre&gt;
Dim session as New NotesSession
Msgbox session.CommonUserName
&lt;/pre&gt;
To catch the name stored in a document field, you shoud work with NotesName class and methods  =&gt; 
&lt;pre&gt;
Dim session as New NotesSession
Dim nName As NotesName

Set nName = New NotesName( AlertNotificationdoc.YOUNAMEFIELDHERE(0) )
MsgBox nName.Common 
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>To catch the connected user name in script, you use (likle Ldelincoln said) the CommonUserName method of Session class =&gt; </p>
<pre>
Dim session as New NotesSession
Msgbox session.CommonUserName
</pre>
<p>To catch the name stored in a document field, you shoud work with NotesName class and methods  =&gt; </p>
<pre>
Dim session as New NotesSession
Dim nName As NotesName

Set nName = New NotesName( AlertNotificationdoc.YOUNAMEFIELDHERE(0) )
MsgBox nName.Common 
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: amcauley3</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/#comment-82333</link>
		<dc:creator>amcauley3</dc:creator>
		<pubDate>Tue, 12 Oct 2010 18:07:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-82333</guid>
		<description><![CDATA[I have a loop and a list.  I have set it up so that when it gives an error it sends an email with that database info date and user etc.. 

this is what my code looks like for the loop and the list I need to know how to get the title of each database that has an error and the CN of the person it was going to send it to but could not. Any more ideas?


If Not AlertNotificationdc Is Nothing Then
			Set AlertNotificationdoc = AlertNotificationdc.GetFirstDocument 
			While (Not AlertNotificationdoc Is Nothing) 
		(AlertNotificationdoc .FullName(0))
				
strfield = AlertNotificationdoc.GetItemValue(&quot;A$LogType&quot;)(0)
If strfield = &quot;Error&quot; Then
  
errorlist(AlertNotificationdoc.UniversalID) =AlertNotificationdoc.GetItemValue(db.Title)(0) &amp; &quot;~&quot; &amp; Alertnotificationdoc.GetItemValue(&quot;A$Logtime&quot;)(0)  &amp; &quot;~&quot; &amp; AlertNotificationdoc.GetItemValue(&quot;A$Progname&quot;)(0)&amp; &quot;~&quot; &amp; Alertnotificationdoc.GetItemValue(session.commonusername)(0) &amp; &quot;~&quot; &amp; Alertnotificationdoc.GetItemValue(&quot;A$ERRMSG&quot;)(0) 
					okayemail=True	
					
				End If]]></description>
		<content:encoded><![CDATA[<p>I have a loop and a list.  I have set it up so that when it gives an error it sends an email with that database info date and user etc.. </p>
<p>this is what my code looks like for the loop and the list I need to know how to get the title of each database that has an error and the CN of the person it was going to send it to but could not. Any more ideas?</p>
<p>If Not AlertNotificationdc Is Nothing Then<br />
			Set AlertNotificationdoc = AlertNotificationdc.GetFirstDocument<br />
			While (Not AlertNotificationdoc Is Nothing)<br />
		(AlertNotificationdoc .FullName(0))</p>
<p>strfield = AlertNotificationdoc.GetItemValue(&#8220;A$LogType&#8221;)(0)<br />
If strfield = &#8220;Error&#8221; Then</p>
<p>errorlist(AlertNotificationdoc.UniversalID) =AlertNotificationdoc.GetItemValue(db.Title)(0) &amp; &#8220;~&#8221; &amp; Alertnotificationdoc.GetItemValue(&#8220;A$Logtime&#8221;)(0)  &amp; &#8220;~&#8221; &amp; AlertNotificationdoc.GetItemValue(&#8220;A$Progname&#8221;)(0)&amp; &#8220;~&#8221; &amp; Alertnotificationdoc.GetItemValue(session.commonusername)(0) &amp; &#8220;~&#8221; &amp; Alertnotificationdoc.GetItemValue(&#8220;A$ERRMSG&#8221;)(0)<br />
					okayemail=True	</p>
<p>				End If</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ledlincoln</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/#comment-82332</link>
		<dc:creator>ledlincoln</dc:creator>
		<pubDate>Tue, 12 Oct 2010 17:41:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-82332</guid>
		<description><![CDATA[Sounds like you might be using LotusScript, in which case you need to set up a NotesDatabase object and get its properties from there:

Dim session as New NotesSession
Dim db as NotesDatabase
Set db = session.CurrentDatabase
Msgbox db.Title
Msgbox db.FileName
Msgbox session.CommonUserName]]></description>
		<content:encoded><![CDATA[<p>Sounds like you might be using LotusScript, in which case you need to set up a NotesDatabase object and get its properties from there:</p>
<p>Dim session as New NotesSession<br />
Dim db as NotesDatabase<br />
Set db = session.CurrentDatabase<br />
Msgbox db.Title<br />
Msgbox db.FileName<br />
Msgbox session.CommonUserName</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amcauley3</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/displaying-database-and-using-commonnames/#comment-82331</link>
		<dc:creator>amcauley3</dc:creator>
		<pubDate>Tue, 12 Oct 2010 15:53:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-82331</guid>
		<description><![CDATA[1.) a property of the document that returns a handle to the database object....so something like  alertdoc..title but I need the property. Any advice?

2.) that works for a view but how would I use that in a agent or better yet a list?]]></description>
		<content:encoded><![CDATA[<p>1.) a property of the document that returns a handle to the database object&#8230;.so something like  alertdoc..title but I need the property. Any advice?</p>
<p>2.) that works for a view but how would I use that in a agent or better yet a list?</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 3/10 queries in 0.037 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 10:25:32 -->