This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


May 6, 2014, 1:57 PM
1 Posts

Error when run Evaluate( strFormula, doc ) on server

  • Category: Domino Server
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2

One of our databases allows users to select a part # from the list. List is populated by the run on server agent which returns list of parts. (code blow).

 

 Dim s As New NotesSession
 Dim agent As NotesAgent
 Set agent = s.CurrentAgent
 Dim db As NotesDatabase
 Dim doc As NotesDocument
 Dim PartNo As String
  
 Set db = s.CurrentDatabase
 Set doc = db.GetDocumentByID(agent.ParameterDocID)
  
 
 PartNo = doc.AssyNo(0)
 
 
strFormula = { @Unique( @DbCommand( "ODBC" : "NoCache" ; "SQL" ; "USER" ; "*****" ; "QUERY"  )) }
strFormula1 = { @Unique( @DbCommand( "ODBC" : "NoCache" ; "IBM AS400" ; "USER" ; "******" ; "QUERY") }
 
 
 
varList = Evaluate( strFormula, doc )
 
varList1 = Evaluate( strFormula1, doc )
 
varList = ArrayAppend(varList, varList1)
 
 
 
  
 Dim item As NotesItem
 Set item = doc.ReplaceItemValue( "PartsList", sortVariant(varList) )
 Call doc.Save( False, True )

 

This agent was working for the last 10 years until last weekend upgrade to 9.01

 

Does anybody experienced similar problem.

 

Regards

 

Robert

May 7, 2014, 11:58 AM
145 Posts
Some questions
There are a lot of potential failure points in that code. It'd be helpful to have the error message, if any.

- What note ID is being returned by ParameterDocID?
- Does this ID still exist in the database, and does the signer of the agent have access rights to it?
- I assume that PartNo is used in the DbCommand query, are they seeing a valid value for it?
- Do the DbCommands return the formulas they expect?
- What happens if they hard-code the formula into the Evaluate function?
May 28, 2014, 2:46 PM
28 Posts
and it seems you need NotesSQL tool update for ODBC
theres likely a requirement to have the NotesSQL upgraded on your server if you have move up to this level.
There's was this catch with the early Notes 9.00 version:
http://www-10.lotus.com/ldd/ndsebetaforum.nsf/topicThread.xsp?action=openDocument&documentId=5B4BA5565A8B9C3785257B32006FBC3B

Check out if there's a working IBM ODBC driver (former NotesSQL) for Notes 9 out..here:
http://www.ibm.com/developerworks/lotus/toolkits.html

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal