LotusScript equivalent: @Unique(@DbColumn
Posted on 2002-03-28
I have a pair of agents now that I use to update one field in a collection of selected documents from a view. Both are done in @Formulae.
The first agent is set as Run Once. It prompts the user for the new value for the field. It writes the value to an environment variable, and then calls the other agent.
The second agent runs on all selected records. It reads the environment variable, makes some comparisons with existing data in each record, and updates (or not) accordingly. Under some circumstances it also sends a mail notification to a list of people that it derives from an @DBColumn.
All this works well, but now I need to add something else. I need it to (under some circumstances) open a new record in a different database for the user to complete. If there are five documents selected in the view and three of these documents match the circumstances, I need for it to create three new records in the other database for the user to fill in the blanks (with some information inheriting over from the source document).
The trouble is that requires an @Command, and you can't use those in an agent that runs on selected documents.
So I need to convert the second agent to LotusScript, I presume. The trouble is, while I do fine at reading LotusScript, I don't know the classes well enough to be quick with coding it.
I've got the script working on the selected documents and performing all the necessary updates without any problem. But I can't figure out how to extract the mailing list.
The current mailing list comes from
@Unique(@DbColumn("Notes": ""; ""; "(GUIStaff)"; 1))
How do I get this in LotusScript?
After I get the list, I think I've figured out doc.Send() well enough to handle the mailing.
But then I still have the challenge of opening new records in the other database. This needs to open a new record for each document that matches the right conditions and leave it open for the user to complete. Optimally, it would be something like this:
If rightConditions = 1 Then
Evaluate("@Command([Compose]; @Subset(@DbName; 1): "OtherDB.NSF"; "FormName")")
But you can't evaluate @Commands. So how can I do these things?
Thanks for any help -- b.r.t.
p.s. zvonko -- If this question looks familiar, it's because I had a similar one the other day. But I figured out how to do parts of it, so I deleted the question, which still showed no answers. Later I got a notification that you had responded to the first post, apparently at the same time I deleted it. I've not been able to read your post on that question. Sorry!