2 Replies Latest reply on Jul 4, 2011 9:03 AM by Tbear

    "If" function problem #2

    Tbear

      Title

      "If" function problem #2

      Post

      CONTACT table has a field called "Supporter?" with a Yes/No radio button field control.

      I want to automate "Supporter?" by a calculation looking to the "DonationAmount" field of the DONATION table.

      I've tried every combination of this without success: If ( DONATION::DonationAmount= ""; "No" ; "Yes" ) 

      I have turned OFF the Don't evaluate if fields are empty and the Don't replace field switches. 

      The "No" part works but when I enter a dollar amount in the 'DonationAmount' field and committ nothing happens.

        • 1. Re: "If" function problem #2
          casey777

          Tbear, your DonationAmount field should be a number field, and your script step for the Supporter text field would be If(Donation::DonationAmount=0;"No";"Yes"). Although it looks like your DonationAmount is in a related field which may include several entries for the person causing you then to expand your "If" step to include whether the donation is current and thus making the supporter status a "Yes" only for the current applicable year.

          • 2. Re: "If" function problem #2
            Tbear

            TECman, the DonationAmount field is already a number field. What I ended up doing is this:

            I used this in the 'Donor?' field: If (IsEmpty( DONATION::DonationAmount);"No";"Yes" ) and changed that field type to Calculation which did the trick. It was formerly a Text type. (I keep forgetting about the types with some of these things).

            I am a fish out of water as I struggle with this FM task but I guess I can consider it Alzheimer's prevention! I am not a 'logical thinker' by nature and I'm no good at math either so this is like Mission Impossible for me! :)