?
Solved

@If question

Posted on 2003-03-12
6
Medium Priority
?
220 Views
Last Modified: 2013-12-18
I'm trying to create an action button in a form which will execute a specific action based upon the value of a field. I think I have a syntax problem, but I'm not sure.

The field that is referenced in @If is a radio button named "Verifier_Accept" with the following 2 possible values: "Accepted" and "Need More Info".

I want to toggle an @MailSend & @Prompt based upon what the value is,

For "Accepted":

@MailSend(Verifier_Assigned_To;"";""; Subject;"";"You have been assigned Why-Why # ":Why_Why_Number:" by " :  @Name([CN];Verifier_Names):"     A response is due on   ":Verifier_Due_Date:"    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]);
@Prompt([OK];"ELECTRONIC MESSAGE SENT";"Email has been sent to Assignee");
@If(@IsValid;
@Do(@Command([FileSave]); @Command([FileCloseWindow])); "")


FOR "Need More Info":

@MailSend(Initiator:Initiator_Other_Contacts:Initiator_Courtesy_Copies_To;"";""; Subject;"";"Why-Why # ":Why_Why_Number:"     More Information is requested by ":@Name([CN];Verifier_Names):"Info Requested":Verifier_Questions:"    Please view the comments / questions in the Why-Why Verification section for more details.   Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]);
@Prompt([OK];"ELECTRONIC MESSAGE SENT";"Email has been sent to Initiators requesting MORE INFO for this Why-Why");
@If(@IsValid;
@Do(@Command([FileSave]); @Command([FileCloseWindow])); "")


Can anyone help me with the syntax on this?
0
Comment
Question by:simpsop
[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
  • 2
6 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8121161
Did you try

@IF(Verifier_accept = "Accepted";
   @Do(First set of statements
       );
Verifier_accept = "Need More Info" ;
   @Do(Second set of statements
       );
@Success)

?
0
 
LVL 4

Expert Comment

by:pratigan
ID: 8121194
ok.. first the form should be auto refresh fields or a UIDOC.Refresh before the button is used in order to refresh and validate the field values. @isValid is not necessary if you auto refresh fields as the refresh will take care of validating the formulas within the form.
@If(@IsValid;
@Do(@Command([FileSave]); @Command([FileCloseWindow])); "")
would just be:
@Command([FileSave]);
@Command([FileCloseWindow])


Subject is refering to a field on the form that contains values for this field .. correct.!?  When you string values together you need to use the + sign.  For instance in your example above.
@MailSend(Verifier_Assigned_To;"";""; Subject;"";"You have been assigned Why-Why # " + Why_Why_Number + " by " + @Name([CN];Verifier_Names)+ "     A response is due on   " + Verifier_Due_Date + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]);
  The List separators : work for field values inputted not actual text.
Try this....
0
 

Author Comment

by:simpsop
ID: 8122077
Thanks so far, looking better...

Here's what I wound up with.

It tells me "Function arguments were expected but none were supplied. The error highlights the parenthesis to the left of the  #######ERROR########  marked below



@IF(Verifier_accept = "Accepted";@Do(@MailSend(Verifier_Assigned_To;"";""; Subject;"";"You have been assigned Why-Why # " + Why_Why_Number + " by " + @Name([CN];Verifier_Names)+ "     A response is due on   " + Verifier_Due_Date + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]);)#######ERROR######## ;
Verifier_accept = "Need More Info" ;@Do(@MailSend(Originator + Initiator_Other_Contacts + Initiator_Courtesy_Copies_To;"";""; Subject;"";"Why-Why # " + Why_Why_Number + "     More Information is requested by "+ @Name([CN];Verifier_Names) + "   Info Requested  " + Verifier_Questions + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]););
@Success)
@Command([FileSave]);
@Command([FileCloseWindow])@IF(Verifier_accept = "Accepted";@Do(@MailSend(Verifier_Assigned_To;"";""; Subject;"";"You have been assigned Why-Why # " + Why_Why_Number + " by " + @Name([CN];Verifier_Names)+ "     A response is due on   " + Verifier_Due_Date + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]););
Verifier_accept = "Need More Info" ;@Do(@MailSend(Originator + Initiator_Other_Contacts + Initiator_Courtesy_Copies_To;"";""; Subject;"";"Why-Why # " + Why_Why_Number + "     More Information is requested by "+ @Name([CN];Verifier_Names) + "   Info Requested  " + Verifier_Questions + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]););
@Success)
@Command([FileSave]);
@Command([FileCloseWindow])
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 4

Accepted Solution

by:
pratigan earned 400 total points
ID: 8122244
first...you don't need both file saves...put them outside the Do statement.  also the error, I removed the ;  Try this.
@IF(Verifier_accept = "Accepted";@Do(
@MailSend(Verifier_Assigned_To;"";""; Subject;"";"You have been assigned Why-Why # " + Why_Why_Number + " by " + @Name([CN];Verifier_Names)+ "     A response is due on   " + Verifier_Due_Date + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]));
Verifier_accept = "Need More Info" ;@Do(@MailSend(Originator + Initiator_Other_Contacts + Initiator_Courtesy_Copies_To;"";""; Subject;"";"Why-Why # " + Why_Why_Number + "     More Information is requested by "+ @Name([CN];Verifier_Names) + "   Info Requested  " + Verifier_Questions + "    Link to Why-Why:       ";      [IncludeDoclink]:[PriorityHigh]));
@Success);
@Command([FileSave]);
@Command([FileCloseWindow])


0
 

Author Comment

by:simpsop
ID: 8153076
Thanks for the help.
0
 
LVL 4

Expert Comment

by:pratigan
ID: 8153264
Your welcome !!
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
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…
Suggested Courses

752 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