5 Replies Latest reply on Feb 28, 2011 4:44 PM by philmodjunk

    Calculations

    PamelaD

      Title

      Calculations

      Post

      I would like my job location address fields (street, city, state, & ZIP) to automatically be filled in if it is the same as the mailing address fields.  I added a radio button that gives the option to click on "YES" if the addresses are the same.  I then attempted to create the following "IF" function  

      If ( Same as mailing  = "Yes" ; Mailing Address;  . . .)

      It will populate the job location address fields with the mailing address if YES is clicked but I don't know how to finish the calculation (hence the . . . ).  I would like to be able to enter a different address if YES is not clicked.  I tried using "" (to leave the field blank) but then I'm not able to enter my own values.  Should I be using a different method? 

      I'm a beginner at this so I hope I've explained myself.  I'm sure this won't be my last post! :) 

      Thanks in advance for your patience and help!

        • 1. Re: Calculations
          RickWhitelaw

          Hi,

          The field should be type text with an auto-enter calculation as opposed to field type calculation. Uncheck "Prohibit modification . . . . ." in the field definition dialog. 

          I think If( Same as mailing  = "Yes" ; Mailing Address;  " ") should work under these conditions.

          RW

          • 2. Re: Calculations
            philmodjunk

            As an auto-enter calculation, I think I'd use: If( Same as mailing  = "Yes" ; Mailing Address;  self )

            That will leave the contents of the field unchanged but available for editing into something different if the Field is cleared or "No" is selected. (And then I can clear the "do not replace existing field contents..." option.)

            • 3. Re: Calculations
              raybaudi

              If ( Same as mailing  = "Yes" ; Mailing Address ; Self )

              • 4. Re: Calculations
                PamelaD

                Thank you all - I tried "Self" &  the double " " - they both work.  Pretty simple actually,  however now I feel really stupid. 

                Is there somewhere that I can get a list of what I believe are called parameters.  For example the word "Self" and the double " " so that I can learn what they represent?

                Again, thanks for the help.

                • 5. Re: Calculations
                  philmodjunk

                  Self can be looked up in Filemaker help. As can If functions.

                  "" is simply the empty string and is used throughout filemaker expressions as a way to return a null result.

                  " " would return a single space which would look the same, but not always function the same.