Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP with Formula Language

Status
Not open for further replies.

Auggz

Programmer
Dec 22, 2005
12
0
0
US
I have the formula on a Notes workflow application. The formula is on a button and does the routing plus notification.

The formula works fine and the only problem I am running into is that when a document has been authorized by the final approver, the final notification is not sent out unless there is names on the notify field. I would like the final notification to be sent out irregardless of where theres a name on the notify field or not.

Please help.

/* This is the formula on my button */

@If(@IsDocBeingEdited; ""; @Command([EditDocument]));
@If(@IsValid; @Success; @Return(""));

v_approvers:= @Trim(@Replace(@ProperCase(approvers); @ProperCase( @Name([CN]; @UserName) ); ""));
@SetField("SaveOptions"; "1");
@SetField("approvers"; v_approvers);
@SetField("signatures"; ("Approved on " + @Text(@Now) + " by " + @Name([CN]; @UserName)) : signatures);
@SetField("approvals"; ("Approved on " + @Text(@Now) + " by " + @Name([CN]; @UserName)) : approvals);
@SetField("status"; "Approved by " + @Name([CN]; @UserName) +
@If(@Trim(approvers)= ""; "."; ". Notified " + @Subset(approvers; 1) + " on " + @Text(@Now)));
@SetField("SendTo"; user_name : @Subset(approvers; 1) );

@SetField("CopyTo";
@If(@Contains(@LowerCase(status); "notified");
notify;
@If(@IsError(@DbColumn("":""; "":""; "vfinalnotify"; 1));
notify;
notify : @DbColumn("":""; "":""; "vfinalnotify"; 1))
)
);

@MailSend(@Unique(SendTo); @Unique(CopyTo); "";
@If(@Trim(approvers)= "";
"APPX: " + @Left(desc; 50) + " [Approved by the Management]";
"APPX " + @Left(desc; 50) + " [Submitted to " + @Subset(approvers; 1) + " for Approval]");
@If(comments= ""; ""; comments + @NewLine) + @NewLine + @NewLine +
@If(CopyTo = ""; ""; "cc copy: " + @Name([CN]; @Implode(CopyTo; ",")) + @NewLine) +
"Please click on the attached link to view the document" + @NewLine;
"";
[IncludeDoclink]);

@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])


/* Formula on Copy To field */

@If(@Contains(@LowerCase(status); "notified");
notify;
CopyTo
)
 
Wait a minute there, where is the notification to be sent if there is no recipient name to send to ?

Where exactly do you want to send the notification if there is no name ?

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top