Solved

Formula sort of working

Posted on 2003-12-01
10
354 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
  • 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now