Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Formula sort of working

Posted on 2003-12-01
10
Medium Priority
?
359 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 1400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

688 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