 




<?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: Creating a daily document with LotusScript.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 02:38:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-96529</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Tue, 13 Sep 2011 15:54:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-96529</guid>
		<description><![CDATA[I finally was able to get this to work.  The Error is gone.  However, I scheduled the agent to run daily and when it runs, the results are blank.  But if I manually go into the agent and run the agent it works.  Is there something I am doing wrong.  Here&#039;s the revised code:

Sub Initialize
	Dim session As New NotesSession
	Dim db As NotesDatabase
	Dim v As NotesView
	Dim doc As NotesDocument
	
	Set db = session.CurrentDatabase
	Set doc = db.CreateDocument
	doc.Form = &quot;Copy of UR&quot;	
	doc.Date = (Date)
	doc.Population =  (Population)	
	doc.UR = (UR)
	Call doc.ComputeWithForm(True,False) 
	Call doc.Save(True,True) 
	
End Sub]]></description>
		<content:encoded><![CDATA[<p>I finally was able to get this to work.  The Error is gone.  However, I scheduled the agent to run daily and when it runs, the results are blank.  But if I manually go into the agent and run the agent it works.  Is there something I am doing wrong.  Here&#8217;s the revised code:</p>
<p>Sub Initialize<br />
	Dim session As New NotesSession<br />
	Dim db As NotesDatabase<br />
	Dim v As NotesView<br />
	Dim doc As NotesDocument</p>
<p>	Set db = session.CurrentDatabase<br />
	Set doc = db.CreateDocument<br />
	doc.Form = &#8220;Copy of UR&#8221;<br />
	doc.Date = (Date)<br />
	doc.Population =  (Population)<br />
	doc.UR = (UR)<br />
	Call doc.ComputeWithForm(True,False)<br />
	Call doc.Save(True,True) </p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-95677</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Tue, 23 Aug 2011 17:42:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-95677</guid>
		<description><![CDATA[I was so excited that I finally got this to fun without the error.  However, when the agent runs on schedule, I receive the same error, but when I manually run the agent, I do not receive any errors.]]></description>
		<content:encoded><![CDATA[<p>I was so excited that I finally got this to fun without the error.  However, when the agent runs on schedule, I receive the same error, but when I manually run the agent, I do not receive any errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-92326</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Thu, 19 May 2011 14:57:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-92326</guid>
		<description><![CDATA[Thank you so much. I will work on this later in the afternoon.  Have a great day. 

T. Will]]></description>
		<content:encoded><![CDATA[<p>Thank you so much. I will work on this later in the afternoon.  Have a great day. </p>
<p>T. Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-91151</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Wed, 20 Apr 2011 17:25:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-91151</guid>
		<description><![CDATA[Thank you very much.  Have a great day.  I will work on this later in the afternoon.]]></description>
		<content:encoded><![CDATA[<p>Thank you very much.  Have a great day.  I will work on this later in the afternoon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stiletto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-91142</link>
		<dc:creator>stiletto</dc:creator>
		<pubDate>Wed, 20 Apr 2011 13:46:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-91142</guid>
		<description><![CDATA[Whenever you have a situation where code works when you run it, but fails when it runs automatically (like on a schedule), it is often a matter of permissions.  When you run it, it is executing with your permissions.  When it runs automatically, it runs as the signer or whoever it is set to run as.  In your case, you&#039;re accessing a secondary db.  Check the ACL of that database to be sure your agent has access to it.]]></description>
		<content:encoded><![CDATA[<p>Whenever you have a situation where code works when you run it, but fails when it runs automatically (like on a schedule), it is often a matter of permissions.  When you run it, it is executing with your permissions.  When it runs automatically, it runs as the signer or whoever it is set to run as.  In your case, you&#8217;re accessing a secondary db.  Check the ACL of that database to be sure your agent has access to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-91136</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Wed, 20 Apr 2011 12:54:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-91136</guid>
		<description><![CDATA[Thank you so much.  I will see if this works.  Good luck on your numeric sort as well.  If I find out anything, I will try to help you as well.  Thanks again.]]></description>
		<content:encoded><![CDATA[<p>Thank you so much.  I will see if this works.  Good luck on your numeric sort as well.  If I find out anything, I will try to help you as well.  Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twill</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-91095</link>
		<dc:creator>twill</dc:creator>
		<pubDate>Tue, 19 Apr 2011 14:03:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-91095</guid>
		<description><![CDATA[Thank you so much.  I failed to stated the information about my document.  I didn&#039;t mean to confuse you about the views. I totally understand that you don&#039;t save views.  

I left out the part about the document.  I am creating a document daily that I want to save to a particular view.  The document that I am creating details is below:

          Name of document = UR

          Field #1 Name = Date with @ Today = Default Field value
          Field #2 Name = Population with Default formula value =  
                                         @Sum(@ToNumber(@DbColumn( &quot;Notes&quot; : 
                                           &quot;&quot;;  &quot;noteserv&quot; : &quot;New Neocap.nsf&quot; ; &quot;WRIM&quot;; 1))) 

The view contains the following:

        There&#039;s Four (4) columns in the view.  Columns are as follows:

                                  Column 1  Name= Date - with Default Field as Date
                                  Column 2  Name = UT Rate - with Default formula as Population/125
                                  Column 3 Name =  Number - with Default formula as 
                                                                      @If(Population = &quot;&quot;;&quot;&quot;;1)
                                  Column 4 Name = Manday Total - with Default field as Population

When I create this document manually, I do not receive any errors in the view and the document saves to the view with no problems.

When I run the agent, the document saves to the view, but I receive the error 
However, when I run the agent to create this document.  I receive an error in the 

                         UT Rate Column of the view

The Error  = Error:  Incorrect Data Type for operation or @Function: Number Expected.

I hope this helps.  Thank you so much.  

T. Will]]></description>
		<content:encoded><![CDATA[<p>Thank you so much.  I failed to stated the information about my document.  I didn&#8217;t mean to confuse you about the views. I totally understand that you don&#8217;t save views.  </p>
<p>I left out the part about the document.  I am creating a document daily that I want to save to a particular view.  The document that I am creating details is below:</p>
<p>          Name of document = UR</p>
<p>          Field #1 Name = Date with @ Today = Default Field value<br />
          Field #2 Name = Population with Default formula value =<br />
                                         @Sum(@ToNumber(@DbColumn( &#8220;Notes&#8221; :<br />
                                           &#8220;&#8221;;  &#8220;noteserv&#8221; : &#8220;New Neocap.nsf&#8221; ; &#8220;WRIM&#8221;; 1))) </p>
<p>The view contains the following:</p>
<p>        There&#8217;s Four (4) columns in the view.  Columns are as follows:</p>
<p>                                  Column 1  Name= Date &#8211; with Default Field as Date<br />
                                  Column 2  Name = UT Rate &#8211; with Default formula as Population/125<br />
                                  Column 3 Name =  Number &#8211; with Default formula as<br />
                                                                      @If(Population = &#8220;&#8221;;&#8221;";1)<br />
                                  Column 4 Name = Manday Total &#8211; with Default field as Population</p>
<p>When I create this document manually, I do not receive any errors in the view and the document saves to the view with no problems.</p>
<p>When I run the agent, the document saves to the view, but I receive the error<br />
However, when I run the agent to create this document.  I receive an error in the </p>
<p>                         UT Rate Column of the view</p>
<p>The Error  = Error:  Incorrect Data Type for operation or @Function: Number Expected.</p>
<p>I hope this helps.  Thank you so much.  </p>
<p>T. Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stiletto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/creating-a-daily-document-with-lotusscript/#comment-91090</link>
		<dc:creator>stiletto</dc:creator>
		<pubDate>Tue, 19 Apr 2011 12:58:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-91090</guid>
		<description><![CDATA[Well, first you&#039;ll need to tell us what the formulas are for your 3 columns.  It might be helpful to know something about the fields in the documents and the values you&#039;re inputting, too.  
But, to be honest, I think you have a misunderstanding about views and documents.  You don&#039;t save views; they are just a means of seeing a list of documents and their values (to be overly simplistic).  As the documents change, the values shown in the view change.]]></description>
		<content:encoded><![CDATA[<p>Well, first you&#8217;ll need to tell us what the formulas are for your 3 columns.  It might be helpful to know something about the fields in the documents and the values you&#8217;re inputting, too.<br />
But, to be honest, I think you have a misunderstanding about views and documents.  You don&#8217;t save views; they are just a means of seeing a list of documents and their values (to be overly simplistic).  As the documents change, the values shown in the view change.</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.038 seconds using memcached
Object Caching 365/371 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 02:53:40 -->