Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Brilliant! Your site is great...and saving me hours of time at work and making my boss think I am brilliant too! I also picked up on a thread that will potentially save us a lot of money in the future..."

Geography

Where in the world do Tek-Tips members come from?

Execute Notes field default formula from agent

Alan327 (Programmer)
6 Oct 11 15:54
Domino Development - I have a form with total fields that derive their value from a @Sum(DBLookup) default value formula.   The totals update whenever the form is opened.  However, I want to update the totals WITHOUT opening the form.  I tried the following code in an agent with no success.  Can this be done?

Set viewC = db.GetView"(StudentProfs)")    
Set docC = viewC.GetFirstDocument
Do While Not docC Is Nothing
  Call docC.ComputeWithForm(True, False)
  Call docC.Save(True, False)
  Set docC = viewC.GetNextDocument(docC)
Loop    
 
pmonett (Programmer)
25 Nov 11 5:54
When you open a document, the form you use has access to the UIworkspace object.

When you run an agent, you cannot access the UIworkspace, thus your @Sum(@DBlookup) cannot execute.

You can use an agent, but you will have to replicate the calculation in the code and enter the result in the document for the result to correspond to your wishes.

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close