Welcome to Forums Sign in | Join | Help | Forums
in Search


IF_THEN formula

Last post 04-23-2008 3:45 PM by Drew Allen. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-23-2008 2:40 PM

    IF_THEN formula

    I'm trying to create a statement like this:

     

    if {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}=0 then ". Thank you for completing your parent pledge." else " leaving a balance of {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}. Pledge payments received by June 15, 2008 is greatly appreciated."

     

    The first statement works but for the else statement it does not seem to recognize the {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount} as a field rather it prints as a text.

      Catherine

     

  • 04-23-2008 3:45 PM In reply to

    • Drew Allen
    • Top 10 Contributor
    • Posts 514
    • Organization: Children's Hospital of Philadelphia
    • Products:  The Information Edge, The Raiser's Edge

    Re: IF_THEN formula

     That's because everything within the quotes (") is treated as text.  You'll need to concatenate the static strings with the field.  Also, all parts of a concatenation need to be compatible types, so you'll need to convert the amount to a string.  It will need to be something like

     "leaving a balance of " + CStr({CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}) + ".  Pledge payments received by June 15, 2008 are greatly appreciated."

    CStr() has a couple of different options that allow you to control the formatting of the result.  You may want to look at the help on that function. 

    I also corrected the agreement in the second sentence. "Payments" is plural, so the verb has to be plural, too.

    Drew
     

    J. Drew Allen
    The Children's Hospital of Philadelphia
    Filed under:
Page 1 of 1 (2 items)