• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Selecting documents in LotusScript / Notes Formula

I have an agent "a" that creates a document in a view.
I have another agent "b" that runs on selected documents in the view.
What i want to do is make a button to run agent "a" to create a document and then run agent "b" on the document created.
I have created a button to run agent "a" then agent "b". But when the document is created by agent "a" it is not selected, so agent "b" will run on whatever document is currently selected and not the required new document.
I need to be able to select or set focus on the document created so that agent "b" can run on it. Does anybody know how to select the required new document?
0
Glacieruk
Asked:
Glacieruk
  • 3
  • 2
1 Solution
 
HemanthaKumarCommented:
In agent 'a', set a field flag (say, ToBeRun="1")in the document . Then desgin agent 'b' to look for the documents which has this field flag (Click on Add Search button, go to COndition "By Field", Select "ToBeRun" and  "is equal to" 1). Don't forget to remove TOBeRUn flag from the document in your agent b code

Save the agent and now run Agent a and b simultaneously.

~Hemanth
0
 
scottrmaCommented:
There isn't really an easy way to do this. The best thing to do would be to consolidate the code from your two agents into a single agent.
0
 
scottrmaCommented:
Good idea Hemanth! Didn't think of that. But it still would probably be cleaner from a design perspective to have all the code in one agent, but that's just my opinion....

Cheers,

Scott
0
 
HemanthaKumarCommented:
Yeah right Scott, I hope Glacieruk would have thought about that. There should be something holding him up with two agents design.

By the way Scott, what is rma at the end of your id ?

0
 
scottrmaCommented:
R is my middle initial. Ma is my last name (it's a fairly common Chinese last name).

Cheers,

Scott
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now