<?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>False Positives &#187; Lotus Domino</title>
	<atom:link href="http://www.falsepositives.com/index.php/categorias/code/lotus-domino/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.falsepositives.com</link>
	<description>Ian Irving&#039;s Code and Culture from Toronto</description>
	<lastBuildDate>Thu, 11 Mar 2010 16:25:04 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>False Positives on Planet Lotus</title>
		<link>http://www.falsepositives.com/index.php/2009/09/25/false-positives-on-planet-lotus/</link>
		<comments>http://www.falsepositives.com/index.php/2009/09/25/false-positives-on-planet-lotus/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 13:36:16 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2233</guid>
		<description><![CDATA[Once upon a time, 2006, there was &#8220;Show &#8216;n Tell Thursdays &#8211; A Project Of The Lotus Notes And Domino&#8220;, and the SNTT tag is still used, but Planet Lotus is where the action is now, an aggregation of Lotus related blogs and news.
Recently False Positives was accepted for inclusion as part of that community. [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, 2006, there was &#8220;<a href="http://www.rhs.com/web/blog/gregate/v3test.nsf">Show &#8216;n Tell Thursdays &#8211; A Project Of The Lotus Notes And Domino</a>&#8220;, and the <a href="http://blogsearch.google.ca/blogsearch?hl=en&#038;oe=utf-8&#038;client=firefox-a&#038;um=1&#038;ie=UTF-8&#038;q=sntt&#038;btnG=Search+Blogs" rel="tag">SNTT</a> tag is still used, but <a href="http://planetlotus.org/">Planet Lotus</a> is where the action is now, an aggregation of Lotus related blogs and news.</p>
<p>Recently False Positives was accepted for inclusion as <a href="http://planetlotus.org/profiles/ian-irving">part</a> of that community.  It is a great honor (although also scary to boot) to have my <a href="http://www.falsepositives.com/index.php/categorias/code/lotus-domino/">Domino and Lotus Notes related post&#8217;s</a> in such fine company. </p>
<p>And while you&#8217;re here there is all the &#8220;other stuff&#8221; both code and / culture &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/09/25/false-positives-on-planet-lotus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validating URL and Email Addresses with regexp in Lotus Notes</title>
		<link>http://www.falsepositives.com/index.php/2009/09/17/validating-url-and-email-addresses-with-regexp-in-lotus-notes/</link>
		<comments>http://www.falsepositives.com/index.php/2009/09/17/validating-url-and-email-addresses-with-regexp-in-lotus-notes/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 13:35:43 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2217</guid>
		<description><![CDATA[I needed to recreate this from scratch, and so I&#8217;m documenting this here for the next time.
Most of the credit should go to Julian Robichauxand his ls2j examples db, and in particultar the JakartaOroWrapper  Library
My &#8220;invention&#8221; involves creating a isValidateURL and isValidateEmailAddress  Regular Expression (or regexp ) routines that worked for me.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647Uselsx &#34;*javacon&#34;
Use [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to recreate this from scratch, and so I&#8217;m documenting this here for the <em>next</em> time.</p>
<p>Most of the credit should go to <a href="http://www.nsftools.com">Julian Robichaux</a>and his <a href="http://www.nsftools.com/tips/NotesTips.htm#ls2jexamples">ls2j examples db</a>, and in particultar the JakartaOroWrapper  Library</p>
<p>My &#8220;invention&#8221; involves creating a isValidateURL and isValidateEmailAddress  Regular Expression (or regexp ) routines that worked for me.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Uselsx &quot;*javacon&quot;<br />
Use &quot;JakartaOroWrapper&quot;<br />
<br />
Function isValidateURL (Url As String) As Boolean<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Dim jSession As New JavaSession<br />
&nbsp; &nbsp; Dim oroClass As JavaClass<br />
&nbsp; &nbsp; Dim oro As JavaObject<br />
&nbsp; &nbsp; Dim vector As JavaObject<br />
&nbsp; &nbsp; Dim jError As JavaError<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; '** get the ORO wrapper class and instantiate an instance of it<br />
&nbsp; &nbsp; Set oroClass = jSession.GetClass(&quot;JakartaOroWrapper&quot;)<br />
&nbsp; &nbsp; Set oro = oroClass.CreateObject<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Dim pattern As String &nbsp; <br />
' &nbsp; pattern = &quot;^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$&quot; <br />
' &nbsp; pattern = &quot;(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;amp;:/~\+#]*[\w\-\@?^=%&amp;amp;/~\+#])?&quot; &nbsp; <br />
&nbsp; &nbsp; pattern = &quot;^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&amp;amp;%\$#\=~])*$&quot;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; isValidateURL = oro.matches(Url, pattern, False)&nbsp; &nbsp; <br />
End Function<br />
<br />
Function isValidateEmailAddress (emailAddress As String) As Boolean<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Dim jSession As New JavaSession<br />
&nbsp; &nbsp; Dim oroClass As JavaClass<br />
&nbsp; &nbsp; Dim oro As JavaObject<br />
&nbsp; &nbsp; Dim vector As JavaObject<br />
&nbsp; &nbsp; Dim jError As JavaError<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; '** get the ORO wrapper class and instantiate an instance of it<br />
&nbsp; &nbsp; Set oroClass = jSession.GetClass(&quot;JakartaOroWrapper&quot;)<br />
&nbsp; &nbsp; Set oro = oroClass.CreateObject<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; '** here are the strings and patterns we'll play with<br />
&nbsp; &nbsp; Dim testString As String<br />
&nbsp; &nbsp; Dim pattern As String &nbsp; <br />
&nbsp; &nbsp; 'pattern = &quot;\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b&quot; <br />
&nbsp; &nbsp; 'RFC_2822 version<br />
&nbsp; &nbsp; pattern = &quot;[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?&quot;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; isValidateEmailAddress = oro.matches(emailAddress, pattern, False)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
End Function</div></td></tr></tbody></table></div>
<p>How I used it was not very exciting but for completeness.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">If Not NotesDoc.url(0) = &nbsp;&quot;&quot; Then &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; If Not isValidateURL ( NotesDoc.url(0)) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Msgbox &quot;The URL Address (&quot;+NotesDoc.url(0)+&quot;) doesn't look right, Please confirm it is correct.&quot;, 0 + 32, &quot;Validation Error&quot;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NotesUIDoc.GotoField(&quot;URL&quot;)<br />
&nbsp; &nbsp; End If<br />
End If</div></td></tr></tbody></table></div>
<p>A big cautionary note about the regexp patterns I used.  for both Url&#8217;s and emails addresses, I seen them very short and very very long.  It&#8217;s easy to make assumtion about the validate TLD and other aspects of the strings, so test test test, and be aware.</p>
<p>And, of course, this is but a small piece of what you could do with regexp!! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/09/17/validating-url-and-email-addresses-with-regexp-in-lotus-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>can&#8217;t use @ThisName in Hide-When formulas, LOTUS NOTES meta coding FAIL</title>
		<link>http://www.falsepositives.com/index.php/2009/09/11/cant-use-thisname-in-hide-when-formulas-lotus-notes-meta-coding-fail/</link>
		<comments>http://www.falsepositives.com/index.php/2009/09/11/cant-use-thisname-in-hide-when-formulas-lotus-notes-meta-coding-fail/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:16:09 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2203</guid>
		<description><![CDATA[I had hoped to use the &#8220;@ThisName&#8221; to get the suffix of the field name &#8220;Comment_1&#8243; and hide it if the Field &#8220;Status_1&#8243; is &#8220;Pending&#8221; by doing this :
1234Suffix := @Right&#40;@ThisName; &#34;_&#34;&#41;;
EmpListFieldName := &#34;Status_&#34; + Suffix;
Status_value := @GetField&#40;EmpListFieldName&#41;;
@If&#40; Status_value &#160; &#160;= &#34;Pending&#34;;@Return&#40;@True&#41;;@Return&#40;@False&#41;&#41;;
but it didn&#8217;t work  
finally traced it down to the &#8220;@ThisName&#8221; formula and [...]]]></description>
			<content:encoded><![CDATA[<p>I had hoped to use the &#8220;@ThisName&#8221; to get the suffix of the field name &#8220;Comment_1&#8243; and hide it if the Field &#8220;Status_1&#8243; is &#8220;Pending&#8221; by doing this :</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Suffix := <span style="color: #0000FF;">@Right</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@ThisName</span>; <span style="color: #FF00FF;">&quot;_&quot;</span><span style="color: #000000;">&#41;</span>;<br />
EmpListFieldName := <span style="color: #FF00FF;">&quot;Status_&quot;</span> + Suffix;<br />
Status_value := <span style="color: #0000FF;">@GetField</span><span style="color: #000000;">&#40;</span>EmpListFieldName<span style="color: #000000;">&#41;</span>;<br />
<span style="color: #0000FF;">@If</span><span style="color: #000000;">&#40;</span> Status_value &nbsp; &nbsp;= <span style="color: #FF00FF;">&quot;Pending&quot;</span>;@Return<span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@True</span><span style="color: #000000;">&#41;</span>;@Return<span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@False</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>but it didn&#8217;t work <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>finally traced it down to the &#8220;@ThisName&#8221; formula and the Help doc&#8217;s confirmed the bad news about the @ThisName formula:<br />
<blockquote>Note A hide formula is not a field formula, even though it can be set from the field properties dialog. The hide formula applies to the paragraph containing the field. Since a paragraph can contain several fields, there is no &#8220;current field&#8221; in this context.</p></blockquote>
<p>Instead, I will have to hard code the suffix reference, and replace the above code with:</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Suffix := &nbsp;<span style="color: #FF00FF;">&quot;1&quot;</span>;<br />
EmpListFieldName := <span style="color: #FF00FF;">&quot;Status_&quot;</span> + Suffix;<br />
Status_value := <span style="color: #0000FF;">@GetField</span><span style="color: #000000;">&#40;</span>EmpListFieldName<span style="color: #000000;">&#41;</span>;<br />
<span style="color: #0000FF;">@If</span><span style="color: #000000;">&#40;</span> Status_value &nbsp; &nbsp;= <span style="color: #FF00FF;">&quot;Pending&quot;</span>;@Return<span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@True</span><span style="color: #000000;">&#41;</span>;@Return<span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@False</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
<p>which can be compacted down to</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">@GetField</span><span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">&quot;Status_&quot;</span> + <span style="color: #FF00FF;">&quot;1&quot;</span><span style="color: #000000;">&#41;</span> = <span style="color: #FF00FF;">&quot;Pending&quot;</span></div></td></tr></tbody></table></div>
<p>and it will need to be modified for every one of a large number of fields!!! (hence my wish to meta code).</p>
<p>I&#8217;ve add a &#8220;change this please on <a href="http://ideajam.net/IdeaJam/P/ij.nsf/0/D9F1CDF3D4FAFC778625762E0059F146?OpenDocument">idea jam</a></p>
<p>see Ben Langhinrichs on <a href="http://www.geniisoft.com/showcase.nsf/GeniiBlog?OpenForm&#038;Date=20040407">Writing better hide-when formulas</a> for more.</p>
<p>Updates : This post was linked to from DominoPower <a href="http://www.dominopower.com/newsitems/00046005.html">Can&#8217;t use @ThisName in Hide-When formulas</a> on Friday, September 11, 2009, from their <a href="http://www.dominopower.com/news/news.html">News Center</a>. cool!</p>
<p><a href="http://www.rhs.com/poweroftheschwartz">Richard Schwartz</a> made a useful comment on the ideaJam posting which is under appreciated, and quickly forgotten, that:<br />
<blockquote>&#8220;Hide-whens are bound to paragraph, not to a field.&#8221;</p></blockquote>
<p> which was very helpful in me understanding why it&#8217;s &#8220;working a designed&#8221; and not broken, even if mildly frustrating!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/09/11/cant-use-thisname-in-hide-when-formulas-lotus-notes-meta-coding-fail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Expanding Group Names for Lotus Domino using LotusScript</title>
		<link>http://www.falsepositives.com/index.php/2009/09/08/expanding-group-names-for-lotus-domino-using-lotusscript/</link>
		<comments>http://www.falsepositives.com/index.php/2009/09/08/expanding-group-names-for-lotus-domino-using-lotusscript/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:21:12 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=1921</guid>
		<description><![CDATA[I needed to find the people that belonged to a given lotus Notes group.  It couldn&#8217;t be a simple lookup since other groups can and frequently are also members of a group, so it needed to be be recursive.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556Function expandGroupListMembers&#40;GroupName&#41; As Variant
Dim session As New NotesSession
Dim db As NotesDatabase
Dim gView As NotesView
Dim memberList As [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to find the people that belonged to a given lotus Notes group.  It couldn&#8217;t be a simple lookup since other groups can and frequently are also members of a group, so it needed to be be recursive.</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">Function</span> expandGroupListMembers<span style="color: #000000;">&#40;</span>GroupName<span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
<span style="color: #0000FF;">Dim</span> session <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesSession</span><br />
<span style="color: #0000FF;">Dim</span> db <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDatabase</span><br />
<span style="color: #0000FF;">Dim</span> gView <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesView</span><br />
<span style="color: #0000FF;">Dim</span> memberList <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
<span style="color: #0000FF;">Dim</span> gDoc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
<br />
<span style="color: #0000FF;">Set</span> db = session.<span style="color: #0000AA;">CurrentDatabase</span><br />
<span style="color: #0000FF;">Dim</span> nab <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesDatabase</span><span style="color: #000000;">&#40;</span>db.<span style="color: #0000AA;">Server</span> ,<span style="color: #000000;">&quot;names.nsf&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">' this assumes that db is NOT running locally but is a server</span><br />
<br />
<span style="color: #0000FF;">Set</span> gView = nab.<span style="color: #0000AA;">GetView</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;($VIMGroups)&quot;</span> <span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">Set</span> gDoc = grpsView.<span style="color: #0000AA;">GetDocumentByKey</span><span style="color: #000000;">&#40;</span> GroupName , <span style="color: #0000FF;">True</span> <span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">If</span> gDoc <span style="color: #0000FF;">Is</span> <span style="color: #0000FF;">Nothing</span> <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Exit</span> <span style="color: #0000FF;">Function</span> <span style="color: #008000;">'could not find this GroupName in view so stop and return empty</span><br />
<br />
memberList = gDoc.<span style="color: #0000AA;">GetItemValue</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&quot;Members&quot;</span> <span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">Forall</span> member <span style="color: #0000FF;">In</span> memberList<br />
<span style="color: #0000FF;">Dim</span> subMemberList <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
subMemberList = expandGroupListMembers<span style="color: #000000;">&#40;</span>member<span style="color: #000000;">&#41;</span> <span style="color: #008000;">'see if member is a group and if so get its members, recursively.</span><br />
<span style="color: #0000FF;">If</span> <span style="color: #0000FF;">Not</span> <span style="color: #0000FF;">Isempty</span><span style="color: #000000;">&#40;</span>subMemberList<span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">Then</span><br />
<span style="color: #008000;">'member was a group, now add all its members to list</span><br />
<span style="color: #0000FF;">If</span> <span style="color: #0000FF;">Isempty</span> <span style="color: #000000;">&#40;</span>expandGroupList<span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">Then</span><br />
expandGroupListMembers= subMemberList<br />
<span style="color: #0000FF;">Else</span><br />
expandGroupListMembers= &nbsp;AddArraysEval <span style="color: #000000;">&#40;</span>expandGroupListMembers, subMemberList<span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
<span style="color: #0000FF;">Else</span><br />
<span style="color: #008000;">'member was not a group therefore assume is a person and add to list</span><br />
<span style="color: #008000;">' note it could be a server or something else</span><br />
<span style="color: #0000FF;">If</span> <span style="color: #0000FF;">Isempty</span> <span style="color: #000000;">&#40;</span>expandGroupListMembers<span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">Then</span><br />
expandGroupListMembers= member<br />
<span style="color: #0000FF;">Else</span><br />
expandGroupListMembers= &nbsp;AddArraysEval <span style="color: #000000;">&#40;</span>expandGroupListMembers, member<span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
<br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Forall</span><br />
<br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Function</span><br />
<br />
<span style="color: #0000FF;">Function</span> AddArraysEval <span style="color: #000000;">&#40;</span>a1 <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span>, a2 <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
<span style="color: #008000;">'from http://www.nsftools.com/tools/lsbook.htm</span><br />
<span style="color: #008000;">'** add two arrays or scalar values using @Functions</span><br />
<span style="color: #0000FF;">Dim</span> session <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesSession</span><br />
<span style="color: #0000FF;">Dim</span> db <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDatabase</span><br />
<span style="color: #0000FF;">Dim</span> doc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
<span style="color: #0000FF;">Dim</span> var <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
<span style="color: #0000FF;">Set</span> db = session.<span style="color: #0000AA;">CurrentDatabase</span><br />
<span style="color: #0000FF;">Set</span> doc = <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesDocument</span><span style="color: #000000;">&#40;</span>db<span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">Call</span> doc.<span style="color: #0000AA;">ReplaceItemValue</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;a1&quot;</span>, a1<span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">Call</span> doc.<span style="color: #0000AA;">ReplaceItemValue</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;a2&quot;</span>, a2<span style="color: #000000;">&#41;</span><br />
AddArraysEval = <span style="color: #0000FF;">Evaluate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;a1 : a2&quot;</span>, doc<span style="color: #000000;">&#41;</span><br />
<span style="color: #008000;">'** clean up the memory we used</span><br />
<span style="color: #0000FF;">Set</span> doc = <span style="color: #0000FF;">Nothing</span><br />
<span style="color: #0000FF;">Set</span> db = <span style="color: #0000FF;">Nothing</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Function</span></div></td></tr></tbody></table></div>
<p>the AddArraysEval  is from Julian Robichaux&#8217;s very handy <a href="http://www.nsftools.com/tools/lsbook.htm">LotusScript Book</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/09/08/expanding-group-names-for-lotus-domino-using-lotusscript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SNTT: a pseudo Computed for Display Rich Text Field in the Lotus Notes Client</title>
		<link>http://www.falsepositives.com/index.php/2009/09/03/sntt-a-pseudo-computed-for-display-rich-text-field-in-the-lotus-notes-client/</link>
		<comments>http://www.falsepositives.com/index.php/2009/09/03/sntt-a-pseudo-computed-for-display-rich-text-field-in-the-lotus-notes-client/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 05:16:27 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2163</guid>
		<description><![CDATA[As in last weeks posting, I wanted to have help verbiage centrally maintained (without developer innervation)  but always displayed update in the end user document (the final end user).  Easy enough to do with text or on the web, but doing this with rich text (pictures and text markup) on the Notes Client [...]]]></description>
			<content:encoded><![CDATA[<p>As in last weeks <a href="http://www.falsepositives.com/index.php/2009/08/26/sntt-using-lotusscript-to-launch-file-attachements-embeddedobjects-in-lotus-notes/">posting</a>, I wanted to have help verbiage centrally maintained (without developer innervation)  but always displayed update in the end user document (the final end user).  Easy enough to do with text or on the web, but doing this with rich text (pictures and text markup) on the Notes Client was non trivial.  Rich Text field are either &#8220;editable&#8221; or &#8220;computed&#8221; which mean it wasn&#8217;t going to update it if the document was in read mode.</p>
<p>So what I created was a pseudo Computed for Display Rich Text Field.</p>
<p>the field itself was a straight forward Rich Text Computed field, named &#8220;RTCF_Help&#8221;, and with the lotus formula</p>
<p>@GetProfileField( &#8220;ApplicationProfileDocument&#8221; ; &#8220;HelpDocumentation&#8221;)</p>
<p>where &#8220;ApplicationProfileDocument&#8221; is the name on the Profile document and &#8220;HelpDocumentation&#8221; is the rich text field on that Profile document.</p>
<p>the trick is to destroy the item on the document so that even in read mode the field is recreated and re computed. I&#8217;m doing it before the document open and as it closes.</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">Sub</span> Queryopen<span style="color: #000000;">&#40;</span>Source <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">Notesuidocument</span>, Mode <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Integer</span>, Isnewdoc <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span>, Continue <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">Dim</span> doc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">notesdocument</span><br />
<span style="color: #0000FF;">Set</span> doc = Source.<span style="color: #0000AA;">Document</span><br />
<span style="color: #0000FF;">Dim</span> item <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesItem</span><br />
<br />
<span style="color: #0000FF;">If</span> <span style="color: #0000FF;">Not</span> Isnewdoc <span style="color: #0000FF;">Then</span><br />
<span style="color: #0000FF;">Set</span> item = doc.<span style="color: #0000AA;">GetFirstItem</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;RTCF_Help&quot;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">If</span> <span style="color: #0000FF;">Not</span> item <span style="color: #0000FF;">Is</span> <span style="color: #0000FF;">Nothing</span> <span style="color: #0000FF;">Then</span><br />
<span style="color: #0000FF;">Call</span> item.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
<br />
<span style="color: #008000;">' the rest of your code if any....</span><br />
<br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Sub</span><br />
<br />
<span style="color: #0000FF;">Sub</span> Queryclose<span style="color: #000000;">&#40;</span>Source <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">Notesuidocument</span>, Continue <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">Dim</span> doc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
<span style="color: #0000FF;">Set</span> doc = Source.<span style="color: #0000AA;">Document</span><br />
<span style="color: #0000FF;">Dim</span> item <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesItem</span><br />
<br />
<span style="color: #0000FF;">Set</span> item = doc.<span style="color: #0000AA;">GetFirstItem</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;FMUniversalUpdaterHelpDoc&quot;</span><span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">Call</span> item.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Sub</span></div></td></tr></tbody></table></div>
<p>One thing that didn&#8217;t work was any attached file in the profile documents rich text, which looked like it was there but would open / launch (which is where last weeks post came from : <a href="http://www.falsepositives.com/index.php/2009/08/26/sntt-using-lotusscript-to-launch-file-attachements-embeddedobjects-in-lotus-notes/">SNTT : using LotusScript to launch file attachements (EmbeddedObjects) in Lotus Notes</a>).</p>
<p>The fall back position for this would be have a Button that opened the Profile document in read mode like this</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">Sub</span> Click<span style="color: #000000;">&#40;</span>Source <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">Button</span><span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">Dim</span> &nbsp;workspace <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesUIWorkspace</span><br />
<span style="color: #0000FF;">Dim</span> session <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesSession</span><br />
<span style="color: #0000FF;">Dim</span> db <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDatabase</span><br />
<span style="color: #0000FF;">Dim</span> doc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
<span style="color: #0000FF;">Set</span> db = session.<span style="color: #0000AA;">CurrentDatabase</span><br />
<span style="color: #0000FF;">Set</span> doc = db.<span style="color: #0000AA;">GetProfileDocument</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;ApplicationProfileDocument&quot;</span> <span style="color: #000000;">&#41;</span><br />
<span style="color: #0000FF;">Call</span> workspace.<span style="color: #0000AA;">EditDocument</span><span style="color: #000000;">&#40;</span> <span style="color: #0000FF;">False</span>, doc, <span style="color: #0000FF;">True</span> <span style="color: #000000;">&#41;</span><br />
<br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Sub</span></div></td></tr></tbody></table></div>
<p>enjoy <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve add having a real Computed for Display Rich Text Field in the Lotus Notes Client to <a href="http://ideajam.net/IdeaJam/P/ij.nsf/0/00B2E134C03C94F68625761F006B5F1A?OpenDocument">Idea Jam</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/09/03/sntt-a-pseudo-computed-for-display-rich-text-field-in-the-lotus-notes-client/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sacha Chua shares her Lotus Notes mail merge from a Microsoft Excel spreadsheet</title>
		<link>http://www.falsepositives.com/index.php/2009/08/27/sacha-chua-shares-her-lotus-notes-mail-merge-from-a-microsoft-excel-spreadsheet/</link>
		<comments>http://www.falsepositives.com/index.php/2009/08/27/sacha-chua-shares-her-lotus-notes-mail-merge-from-a-microsoft-excel-spreadsheet/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:40:23 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>
		<category><![CDATA[Toronto]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2154</guid>
		<description><![CDATA[Toronto&#8217;s Connector extraordinaire Sacha Chua developed this super-nifty Lotus Notes script which does a flexible mail merge from a Microsoft Excel spreadsheet to Lotus Notes, as documented and shared in Lotus Notes mail merge from a Microsoft Excel spreadsheet.  
Keep on Coding, Sharing, Story telling, and Connecting!
]]></description>
			<content:encoded><![CDATA[<p>Toronto&#8217;s <a href="http://sachachua.com/wp/2009/08/18/new-presentation-the-shy-connector/" rel="tag">Connector</a> extraordinaire <a href="http://sachachua.com/wp/">Sacha Chua</a> developed this super-nifty Lotus Notes script which does a flexible mail merge from a Microsoft Excel spreadsheet to Lotus Notes, as documented and shared in <a href="http://sachachua.com/wp/2009/07/27/lotus-notes-mail-merge-from-a-microsoft-excel-spreadsheet/">Lotus Notes mail merge from a Microsoft Excel spreadsheet</a>.  </p>
<p>Keep on Coding, Sharing, Story telling, and Connecting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/08/27/sacha-chua-shares-her-lotus-notes-mail-merge-from-a-microsoft-excel-spreadsheet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SNTT : using LotusScript to launch file attachements (EmbeddedObjects) in Lotus Notes</title>
		<link>http://www.falsepositives.com/index.php/2009/08/26/sntt-using-lotusscript-to-launch-file-attachements-embeddedobjects-in-lotus-notes/</link>
		<comments>http://www.falsepositives.com/index.php/2009/08/26/sntt-using-lotusscript-to-launch-file-attachements-embeddedobjects-in-lotus-notes/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 02:13:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2145</guid>
		<description><![CDATA[I wanted to launch a excel (xls) file which was stored in a Profile document, from a Notes Client (tested in r8.5 but I see no reason this will not work in versions going back to r5)
(Making it available to all users of a certain type of document with making hundreds of replicate copies, and [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to launch a excel (xls) file which was stored in a Profile document, from a Notes Client (tested in r8.5 but I see no reason this will not work in versions going back to r5)</p>
<p>(Making it available to all users of a certain type of document with making hundreds of replicate copies, and all a central db administrator user able to roll out a new file with out changing those other documents) </p>
<p>It is not very obvious how to do this, hence this posting</p>
<p>My first Draft was this :</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> &nbsp;workspace <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesUIWorkspace</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> session <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesSession</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> db <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDatabase</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> Pdoc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> attachments <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> attachment <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesEmbeddedObject</span> &nbsp; <br />
<br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> db = session.<span style="color: #0000AA;">CurrentDatabase</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> Pdoc = db.<span style="color: #0000AA;">GetProfileDocument</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;ApplicationProfileDocument&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #008000;">' get the profile document</span><br />
<br />
&nbsp; &nbsp; attachments = <span style="color: #0000FF;">Evaluate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;@AttachmentNames&quot;</span>, Pdoc<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> attachment = Pdoc.<span style="color: #0000AA;">GetAttachment</span><span style="color: #000000;">&#40;</span>attachments<span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">'use a evalutate to get the first &quot;(0)&quot; file attachment</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000FF;">Call</span> attachment.<span style="color: #0000AA;">ExtractFile</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;c:&quot;</span> &amp; attachment.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #008000;">' write it out to the hard drive</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> e = CreateObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;Excel.Application&quot;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">' open excel</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> eWB = e.<span style="color: #0000AA;">Workbooks</span>.<span style="color: #0000FF;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;c:&quot;</span> &amp; attachment.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span>&nbsp; <span style="color: #008000;">' open the file in excel</span><br />
&nbsp; &nbsp; eWB.<span style="color: #0000AA;">Visible</span> = <span style="color: #0000FF;">True</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'make the opened excel file visible</span></div></td></tr></tbody></table></div>
<p>There was a problem the that code in that I could be sure that there weren&#8217;t other file attachments and the first one was going to be the one I wanted.</p>
<p>I&#8217;ve tried to correct that problem here :</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> &nbsp;workspace <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesUIWorkspace</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> session <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">New</span> <span style="color: #0000EE;">NotesSession</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> db <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDatabase</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Dim</span> Pdoc <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">NotesDocument</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> db = session.<span style="color: #0000AA;">CurrentDatabase</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> Pdoc = db.<span style="color: #0000AA;">GetProfileDocument</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;ApplicationProfileDocument&quot;</span> <span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000FF;">Set</span> rtitem = Pdoc.<span style="color: #0000AA;">GetFirstItem</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&quot;RichTextFilewithFileAttacment&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #008000;">'get the field I know the file is in.</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span> rtitem.<span style="color: #0000FF;">Type</span> = RICHTEXT <span style="color: #000000;">&#41;</span> <span style="color: #0000FF;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Forall</span> o <span style="color: #0000FF;">In</span> rtitem.<span style="color: #0000AA;">EmbeddedObjects</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span> o.<span style="color: #0000FF;">Type</span> = EMBED_ATTACHMENT <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000FF;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Call</span> o.<span style="color: #0000AA;">ExtractFile</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;c:&quot;</span> &amp; o.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span>&nbsp; &nbsp; &nbsp; <span style="color: #008000;">' write it out to the c: hard drive &nbsp; &nbsp; </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Set</span> e = CreateObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;Excel.Application&quot;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #008000;">' open &nbsp;excel</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">Set</span> oWB = e.<span style="color: #0000AA;">Workbooks</span>.<span style="color: #0000FF;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&quot;c:&quot;</span> &amp; o.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #008000;">' open the file in excel</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWB.<span style="color: #0000AA;">Visible</span> = <span style="color: #0000FF;">True</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'make the opened excel file visible</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Forall</span>&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000FF;">End</span> <span style="color: #0000FF;">If</span></div></td></tr></tbody></table></div>
<p>This will actually launch <strong>all</strong> the files that are attached in the rich text (or rich text light) field, which I could limit by doing some validation work on the Profile form to ensure only 1 file is attached. </p>
<p>2 (possibly) big assumptions :</p>
<ol>
<li>This is a windows machine with a c: drive and enough free space.  this is testable but I&#8217;m too lazy/busy/silly (please only pick one).</li>
<li>The file to be launched is an Excel.  This could be allow for be testing the file name extension and doing the appropriate thing. (and that assumes the MS Excel is the application for that file extension and the Open Office, or something similar).</li>
</ol>
<p>update: Collin and Sean both make go points and reminded me of another thing : <a href="http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.help.domino.admin.doc/DOC/H_INITIAL_ADMINISTRATION_ECL.html">Execution Control List&#8217;s (ECL)</a> which control access on the Notes Client.  You may need to get the notes database signed with a ID that has right to write to the file system in your organization, or your end users will be prompted with a &#8220;Execution Security Alert&#8221; with will ask them to either stop the action, execute once or trust the id used.</p>
<p>I&#8217;ve also add related notes in : <a href="http://www.falsepositives.com/index.php/2009/09/03/sntt-a-pseudo-computed-for-display-rich-text-field-in-the-lotus-notes-client/">a pseudo Computed for Display Rich Text Field in the Lotus Notes Client</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/08/26/sntt-using-lotusscript-to-launch-file-attachements-embeddedobjects-in-lotus-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SNTT : Don&#8217;t hard code your Selectedable Years in a Lotus Notes dialog box.</title>
		<link>http://www.falsepositives.com/index.php/2009/08/13/sntt-dont-hard-code-your-selectedable-years-in-a-lotus-notes-dialog-box/</link>
		<comments>http://www.falsepositives.com/index.php/2009/08/13/sntt-dont-hard-code-your-selectedable-years-in-a-lotus-notes-dialog-box/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 19:39:58 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2122</guid>
		<description><![CDATA[Hard coding is bad, bad , bad.  Very bad, okay? (see Avoiding Hard Coding of Group Names).
Here&#8217;s a quick and dirty way to have a drop down dialog which selects the &#8220;Year&#8221; and not be hard coded.
1234currentYear := @Year&#40;@Now &#41;;
@Text&#40;currentYear-1&#41; :
@Text&#40;currentYear&#41; :
@Text&#40;currentYear+1&#41;
which results in a multip value list of (for this year) &#8220;2008&#8243; : [...]]]></description>
			<content:encoded><![CDATA[<p>Hard coding is <strong>bad</strong>, <strong>bad </strong>, <strong>bad</strong>.  <em>Very</em> bad, okay? (see Avoiding <a href="http://www.falsepositives.com/index.php/2006/03/14/avoiding-hard-coding-of-group-names/">Hard Coding of Group Names</a>).</p>
<p>Here&#8217;s a quick and dirty way to have a drop down dialog which selects the &#8220;Year&#8221; and not be hard coded.</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">currentYear := <span style="color: #0000FF;">@Year</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@Now</span> <span style="color: #000000;">&#41;</span>;<br />
<span style="color: #0000FF;">@Text</span><span style="color: #000000;">&#40;</span>currentYear-1<span style="color: #000000;">&#41;</span> :<br />
<span style="color: #0000FF;">@Text</span><span style="color: #000000;">&#40;</span>currentYear<span style="color: #000000;">&#41;</span> :<br />
<span style="color: #0000FF;">@Text</span><span style="color: #000000;">&#40;</span>currentYear+<span style="color: #FF00FF;">1</span><span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
<p>which results in a multip value list of (for this year) &#8220;2008&#8243; : &#8220;2009&#8243; : &#8220;2010&#8243;</p>
<p>and then make the default value</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">@Text</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@Year</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@Now</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
<p>and, of course, you could easily extended this forward or back additional year values if needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/08/13/sntt-dont-hard-code-your-selectedable-years-in-a-lotus-notes-dialog-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SNTT adding http onto URL strings in Lotus Notes</title>
		<link>http://www.falsepositives.com/index.php/2009/08/13/sntt-adding-http-onto-url-strings-in-lotus-notes/</link>
		<comments>http://www.falsepositives.com/index.php/2009/08/13/sntt-adding-http-onto-url-strings-in-lotus-notes/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 10:20:26 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2108</guid>
		<description><![CDATA[The challenge was to have end users enter url&#8217;s (or uri&#8217;s) for content and have it presented as a link on the read only end part of the site.  The problem is that means having &#8220;http&#8221; (or &#8220;https&#8221;) -which indicates Hypertext Transfer Protocol &#8211; appended to the string, if it was not supplied by [...]]]></description>
			<content:encoded><![CDATA[<p>The challenge was to have end users enter url&#8217;s (or uri&#8217;s) for content and have it presented as a link on the read only end part of the site.  The problem is that means having &#8220;http&#8221; (or &#8220;https&#8221;) -which indicates Hypertext Transfer Protocol &#8211; appended to the string, if it was not supplied by the end user.</p>
<p>so in the Input Translational part of the editable field I used the following formula :</p>
<div class="codecolorer-container lotusformulas default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="lotusformulas codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tempUrl := <span style="color: #0000FF;">@ReplaceSubstring</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0000FF;">@ThisValue</span><span style="color: #000000;">&#41;</span>; <span style="color: #0000FF;">@Char</span><span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">0</span><span style="color: #000000;">&#41;</span> : <span style="color: #FF00FF;">&quot; &quot;</span>; <span style="color: #FF00FF;">&quot;&quot;</span><span style="color: #000000;">&#41;</span>;<br />
testUrl := <span style="color: #0000FF;">@UpperCase</span><span style="color: #000000;">&#40;</span>tempUrl <span style="color: #000000;">&#41;</span>;<br />
<span style="color: #0000FF;">@If</span><span style="color: #000000;">&#40;</span>tempUrl &nbsp;= <span style="color: #FF00FF;">&quot;&quot;</span>;@Return<span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">&quot;&quot;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #0000FF;">@Begins</span><span style="color: #000000;">&#40;</span>testUrl ;<span style="color: #FF00FF;">&quot;HTTPS://&quot;</span><span style="color: #000000;">&#41;</span> | <span style="color: #0000FF;">@Begins</span><span style="color: #000000;">&#40;</span>testUrl ;<span style="color: #FF00FF;">&quot;HTTP://&quot;</span><span style="color: #000000;">&#41;</span>; tempUrl ;<br />
<span style="color: #FF00FF;">&quot;http://&quot;</span>+tempUrl <span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
<p>what&#8217;s going on here?<br />
1)  doing a quick stripping out of blank spaces<br />
2) making a copy of that result which is all Upper case<br />
3) if the result is a blank string retun a blank string and stop<br />
4) test if the string starts with http or https already properly appended, if so the return the string<br />
5) if not, then appended &#8220;http://&#8221; to string.</p>
<p>a couple of notes: a) All modern browsers assume &#8220;http://&#8221; so you don&#8217;t need to type that into the address bars, but for a anchor link href the &#8220;http&#8221; (or some other protocol) is required for external references.   b) And &#8220;www.&#8221; is not required and any sensible web site will work with either &#8220;www.domainName&#8221; or &#8220;domainName&#8221;.  indeed &#8220;www.&#8221; is not used for (and breaks) sub domains (&#8221;subDomain.domainName&#8221;)</p>
<p>of course a more interesting problem would be validating those url&#8217;s!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/08/13/sntt-adding-http-onto-url-strings-in-lotus-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stopping Copy and Paste, in Lotus Notes, selectivity in Views</title>
		<link>http://www.falsepositives.com/index.php/2009/07/30/stopping-copy-and-paste-in-lotus-notes-selectivity-in-views/</link>
		<comments>http://www.falsepositives.com/index.php/2009/07/30/stopping-copy-and-paste-in-lotus-notes-selectivity-in-views/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 05:41:07 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Show-n-Tell+Thursday]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2070</guid>
		<description><![CDATA[Previously, I showed how to globally Stop Copy and Paste, in Lotus Notes using formula language, at the database event level.  I also mentioned how to allow some documents to be pasted in. (in the Notes Client)
What if you wish to just shut down copy and paste in a few views but not all? [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, I showed how to globally <a href="http://www.falsepositives.com/index.php/2006/03/23/stopping-copy-and-paste-in-lotus-notes/" rel="tag">Stop Copy and Paste, in Lotus Notes</a> using formula language, at the database event level.  I also mentioned how to allow some documents to be pasted in. (in the Notes Client)</p>
<p>What if you wish to just shut down copy and paste in a few views but not all? Maybe the views that some end users have ACL access to create documents, but you what other users to be able to create documents with copy and paste? (yech, but anyway) </p>
<p>in those views you wish to shut down, modify the Querypaste event :</p>
<div class="codecolorer-container lotusscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="lotusscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">Sub</span> Querypaste<span style="color: #000000;">&#40;</span>Source <span style="color: #0000FF;">As</span> <span style="color: #0000EE;">Notesuiview</span>, Continue <span style="color: #0000FF;">As</span> <span style="color: #0000FF;">Variant</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #0000FF;">Messagebox</span> <span style="color: #000000;">&quot;Copy and Paste is not allowed in this view.&quot;</span>, <span style="color: #FF00FF;">0</span>+<span style="color: #FF00FF;">16</span>, <span style="color: #000000;">&quot;Lotus Notes: &quot;</span>+ Source.<span style="color: #0000AA;">View</span>.<span style="color: #0000AA;">Parent</span>.<span style="color: #0000AA;">Title</span> <br />
&nbsp; &nbsp; Continue = <span style="color: #0000FF;">False</span><br />
<span style="color: #0000FF;">End</span> <span style="color: #0000FF;">Sub</span></div></td></tr></tbody></table></div>
<p>This will fire before the Global database (agent) event, which will not fire off.</p>
<p>side note : I recently modified the copy and paste agent to change if @userName was a member of a Role and if so the @return(&#8221;") (i.e. stop the agent).  This allowed me as [dbadmin] to do copy and paste, just not anyone else!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2009/07/30/stopping-copy-and-paste-in-lotus-notes-selectivity-in-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
