4 Replies Latest reply on Mar 9, 2012 12:09 AM by AlagukannanKumaresan

    Email out with If statement



      Email out with If statement


      Hello All, 


      Ok i am trying to setup a button that does this function.   If approve field = yes send email out.  If approve field = no dont send email out.  The Approve field is member to value list. 



      My script look like this but not working



      If [table name: approve = "yes"]

       Send Email [Send via smtp server........]

      End If



      If I take the if statement way the email shoot out find.




      New at this!  

        • 1. Re: Email out with If statement
             Before you run the script, put the field on the layout to see if there is a value in it for that particular record.
          • 2. Re: Email out with If statement

            I'd take a careful look at the exact content of your approve field.


            In your script it has to exactly contain "yes" (without the quotes and it's not case sensitive.) If there is an extra character such as a space or a carriage return in that field, then your email will not be sent.


            If your field is formatted with check boxes or radio buttons, you may need to temporarily remove the value list format so that you can directly inspect the field. You may also have to click in the field to see there are spaces and/or a carriage return character messing up your script.

            • 3. Re: Email out with If statement
                 Thanks for the post got it to work!!
              • 4. Re: Email out with If statement


                I want to send an email based on the IF condition inside Go to Record. For example, I write like below.

                IF (EMPDET::result_z  = 0)

                Send Email

                End IF

                But when I write this IF condition in script, it goes to Calculation page. There it did not allow me to finish the IF condition as It says parameters missing. I think it expect the syntax.... but I need this send mail only when condition, EMPDET::result_z  = 0. If its 1, then no mail.

                How can I solve this issue?