3 Replies Latest reply on Feb 9, 2011 5:56 AM by Sorbsbuster

    Calculated fields...one works and the other doesn't -- ?

    synergy46

      Title

      Calculated fields...one works and the other doesn't -- ?

      Post

      I am using FM 11 02 ADV

      I have 2 tables:  Members and Dues

      Members < --->> DUES

      I have 2 layouts:

      Members (which has a portal based on Dues)

      Setup (aka Assessments below) which is also based on Dues

      Dues::Setup_total works when placed on the SETUP layout (based on DUES).  But, if I take the same field and place it on the Dues based portal on the Members layout it comes up blank?

      Also, if I put Setup_Total on the same portal, IT WORKS!???

      This may be related to the problem:  "Dues_amount, Assessment_Amount and Other_amount, all have Auto_enter Calculations that should bring the values from their correponding fields as defaults: Setup_Dues_amt, Setup_AssessmentAmt and Setup_OtherAmt.  But it won't??

      I have been working this problem for hours and can't see anything wrong??? Can you?  Help is surely appreciated!

      ishot-470.jpg

        • 1. Re: Calculated fields...one works and the other doesn't -- ?
          Sorbsbuster

          When you have fields in a portal they must all be based on exactly the same TO (or 'relationship') that the portal itself is based on.  (Not absolutely true; you can have down-stream fields, but for this case I suspect this is one of your problems.)  Double-click the portal and check the relationship name at the top.  Double-click each field in the portal and make sure the relationships are exactly the same as the portal's.

          • 2. Re: Calculated fields...one works and the other doesn't -- ?
            synergy46

            Yes, the portal is based on DUES as is each of the fields on the portal. 

            The perlexing part of this for me is that Dues::Setup_Total will NOT display when placed on the portal (based on dues) but it does display correctly when on the SETUP layout which is also basedon DUES?  What is that about?

            I had this thought.  What about making alll the above fields global and then scripting global bariables (like $$total= Global::setup_total) then using SetField to bring the $$total into the correct field.  When the global variables change, I don't think the assigned field value will change.  

            It i 2:20 am and I am off to bed... Your thoughts are appreciated.

            • 3. Re: Calculated fields...one works and the other doesn't -- ?
              Sorbsbuster

              You are confusing me: I can't work out which field(s) and portals you mean.  These second two seem to me like you are putting (can I say 'copying and pasting'?) the same field into the same portal on both occasions:

              --

              Dues::Setup_total works when placed on the SETUP layout (based on  DUES).

              But, if I take the same field (Dues::Setup_total) and place it on the Dues based  portal on the Members layout it comes up blank?

              If I put Setup_Total on the same portal, IT WORKS

              --

              Can you confirm what the relationship is between the two tables, by the way?

              I still think that you are not attaching the same relationship to the fields and their portal.  If you draw a new portal and follow the wizard, adding the field Dues::Setup_total only from the list of fields it offers you, how does it appear then?