Q

Use scheduled agent to refresh all @DBLookup/computed values

I am trying to refresh all @DBLookup/computed values within a document using a scheduled agent.

Manually, this does the job: @Command([ToolsRefreshAllDocs])

I have tried using the LotusScript below, too, but this doesn't seem to work either:

If doc.computewithform
(True, False) Then 
Call doc.save(True, False) 
 

Do you have any suggestions?
ComputeWithForm does work with @DBLookup as well as other computed fields, but you have to consider the different context of code running on your workstation versus on the server. The current username is the server name rather than yours, and if you want to refer to a database on the current server, you should use "" in your formula rather than a hard-coded server name. To write a formula that will work both on the server and on a workstation, use "" to refer to the current database, or if to another database on the same server, use @Subset(@DbName; 1) : "filepath", or use the replica ID of the second database.

If the database is on another server, you may need to make sure there's a "trust" relationship between the servers. The Server configuration document of the second server in the server address book contains a field on the Security tab labeled "Trusted servers." It should list the server running the agent.

Do you have comments on this Ask the Expert Q&A? Let us know.

This was first published in October 2004

Dig deeper on Lotus Notes Domino Agents

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close