Solved

Formula sort of working

Posted on 2003-12-01
10
357 Views
Last Modified: 2013-12-18
Hi Guys

This does not send a mail when Type = "Other"

Also when Type ="Mission" it should list the dates and location it only list the first Start and End Date

@Command([FileSave]);To get DocNum

O :=@If(type ="Sick":"Mission";Type+" "+ "Notification for"+" "+NameFull+"  " +"# "+@Trim(DocNum);
             type ="Other";"Out of Office Notification for"+" "+NameFull+"  " +"# "+@Trim(DocNum);"");

ooo := NameFull+" "+"will be on Mission."+@NewLine+"Start Date: "+" "+@Text(StartDate_2)+" "+"End Date: "+" "+@Text(EndDate_2)+" "+Location;@NewLine;+
"Start Date: "+" "+@Text(StartDate_3)+" "+"End Date: "+" "+@Text(EndDate_3)+" "+Location_1;@NewLine;+
"Start Date: "+" "+@Text(StartDate_4)+" "+"End Date: "+" "+@Text(EndDate_4)+" "+Location_2;@NewLine;+
"Start Date: "+" "+@Text(StartDate_5)+" "+"End Date: "+" "+@Text(EndDate_5)+" "+Location_3;@NewLine;


S := @If(type = "Sick";"Sick";"Other";"Out of Office";"");
R := @If(type ="Other";OtherInfo;"");

MailRemark:=NameFull+" "+"will be"+S+@NewLine+@NewLine+"Out of Office Type: "+type+@NewLine+@NewLine+"Start Date: "+@Text(StartDate)+@NewLine+@NewLine+"End Date: "+@Text(EndDate)+@NewLine+@NewLine+R +@NewLine+@NewLine+"Best Regards";"";
@SetField("ApprovalStatus" ; "Approved" );
notify := " A notification will be sent to " + @Name([CN];MailTo) + " ." ;

MailRemark1 :=@Trim(ooo);

MailTo:= cur_Manager:cur_SiteManager:profile_WhoToNotify:@If(WhoelsetoNotify1 != "";WhoelsetoNotify1;"");
MailCc:= "";
MailSubject:=O;
@Do(@Prompt([OK];"Send Notification";notify);
@MailSend(MailTo;MailCc;"";MailSubject;@If(type != "Mission";MailRemark;MailRemark1);"";[IncludeDoclink]));
@Command([FileSave]);
@Do(@SetField("SaveOptions"; "0");@PostedCommand([FileCloseWindow]))
0
Comment
Question by:adspmo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9851586
Probably it is breaking before it can reach mailsend function. Create a prompt statement and embed it into your formula for debugging purpose..

~Hemanth
0
 

Author Comment

by:adspmo
ID: 9852125
Hi there

A quick question about

Authors fields

When i am using userroles in a Authors field it does not seem to worl

e.g.  Authors Computed Allow Multiple Value

@Trim("[Admin]":Approver_1:Approver+_2)

It shows up as being [Admin] in the properties but doesn't allowm me in

Do I neeed to use @IsMember ....UserRoles or what?

James
0
 

Author Comment

by:adspmo
ID: 9852126
Hi there

A quick question about

Authors fields

When i am using userroles in a Authors field it does not seem to worl

e.g.  Authors Computed Allow Multiple Value

@Trim("[Admin]":Approver_1:Approver+_2)

It shows up as being [Admin] in the properties but doesn't allowm me in

Do I neeed to use @IsMember ....UserRoles or what?

James
0
Industry Leaders: 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!

 
LVL 14

Expert Comment

by:p_partha
ID: 9852176
hi
It shd definitely work. The authors field shd have the value like

"[Admin]":Approver_1:Approver_2

Just check for the role name, it is case sensitive

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9852288
Make sure it is multivalued field and is Authors type :-)
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 9854869
use canonical format for Authors field while using names.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9856359
[IncludeDOcLink] will fail on a new document.  Couuld this be occuring?

Also, try the followng check:

@Do(@Prompt([OKCANCELLIST]:[NOSORT];"Send Notification";notify;"";
("SendTo="+@Text(MailTo)) :
("CopyTo="+@Text(MailCc)) :
("Subject="+@Text(Subject)) :
("Type="+@Text(Type)) :
("Multivalue type?"+@Text(@Elements(Type)>1)) :
("Remark text" + @Text(@If(type != "Mission";MailRemark;MailRemark1)))
);
@MailSend(MailTo;MailCc;"";MailSubject;@If(type != "Mission";MailRemark;MailRemark1);"";[IncludeDoclink]));

0
 

Author Comment

by:adspmo
ID: 9861219
Ok I now have it sending

What I need is for when the type is Mission for it to include the Start and Endate and Location for each range that has been selected
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 350 total points
ID: 9861832
How was it fixed ?

Already you have defined this

ooo := NameFull+" "+"will be on Mission."+@NewLine+"Start Date: "+" "+@Text(StartDate_2)+" "+"End Date: "+" "+@Text(EndDate_2)+" "+Location;@NewLine;+
"Start Date: "+" "+@Text(StartDate_3)+" "+"End Date: "+" "+@Text(EndDate_3)+" "+Location_1;@NewLine;+
"Start Date: "+" "+@Text(StartDate_4)+" "+"End Date: "+" "+@Text(EndDate_4)+" "+Location_2;@NewLine;+
"Start Date: "+" "+@Text(StartDate_5)+" "+"End Date: "+" "+@Text(EndDate_5)+" "+Location_3;@NewLine;

only thing is you have to refine it so that it will not include empty date fields

oooTable := @IF( StartDate_2 != "" & EndDate_2 != ""; "Start Date: "+" "+@Text(StartDate_2) +" "+"End Date: "+" "+@Text(EndDate_2)+" "+Location; "" )  + @NewLine + @IF( StartDate_3 != "" & EndDate_3 != ""; "Start Date: "+" "+@Text(StartDate_3) +" "+"End Date: "+" "+@Text(EndDate_3)+" "+Location; "" )  + @NewLine +@IF( StartDate_4 != "" & EndDate_4 != ""; "Start Date: "+" "+@Text(StartDate_4) +" "+"End Date: "+" "+@Text(EndDate_4)+" "+Location; "" )  + @NewLine + @IF( StartDate_5 != "" & EndDate_5 != ""; "Start Date: "+" "+@Text(StartDate_5) +" "+"End Date: "+" "+@Text(EndDate_5)+" "+Location; "" )  + @NewLine;

ooo := NameFull+" "+"will be on Mission."+@NewLine +@Trim(oooTable);

0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9871876
Hmm, Mission. Sounds like a charitable or religious organization, a la Save the Children, Medecins Sans Frontieres, or just plain missionary work.
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to copy mail box rules from one nsf to another 9 194
Send email lotus notes / VBA 6 174
Why the url within notes is no action 6 58
Lotus Notes Mailbox (Mail Forwarding) 9 68
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question