Solved

Formula sort of working

Posted on 2003-12-01
10
356 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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 connect Lotus Notes to iPhone/Droid without Traveler 14 199
How many GB is a good number to keep these databases? 6 177
ESXCLI upgrade command 1 98
DNS error assumed 8 59
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…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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