5 Replies Latest reply on Nov 12, 2013 4:01 AM by danielle-gwa

    how to create a reference field?

    danielle-gwa

      Hi everyone,

      Some help would be greatly appreciated.

       

       

      I have a summary field that gives a number (used in a subsummary report).

       

      I want to create a field that shows the summarised result of the summary field as text (without the summary result being recalculated). I will then use the result within a further calculation.

       

       

      Can anyine please advise me how to show the content of one field within another text field??

       

       

       

      Thaks for the help in advance!

       

      Danielle

        • 1. Re: how to create a reference field?
          LSNOVER

          Danielle:

           

          Can you explain further what you mean by "without the summary result being recalculated"?

           

          If you are just trying to capture the summary value at some point , you can use the GetSummary function to grap the value and put it into another non-summary field.

          GetSummary

           

          Purpose

           

          Returns the value of summaryField for the current range of records when the database file is sorted by breakField.

           

          Format

          GetSummary(summaryField;breakField)

           

          Parameters

           

          summaryField - field of type summary, or an expression that returns a reference to one.

           

          breakField - field, or an expression that returns a reference to one. To calculate a grand summary value, use the same summary field for both the summary field and the break field parameters.

           

          GetSummary must be set up in the same table as the break field.

           

          Data type returned

           

          number, date, time, timestamp

           

           

          Regards,

          Lee

          1 of 1 people found this helpful
          • 2. Re: how to create a reference field?
            danielle-gwa

            Thanks for the reonse Lee

             

            Maybe this will help explain what i mean.

             

            I have a summery field that gives me a  total of 'Qty' ' result (say for example the summary result is 18)

             

            I then need to do a further calculation using the '18' result of the summary field.

             

            Obviously i cannot use a summary field within a calculation.

             

            So i thought can i create a text field which just shows me the 18 from the summary field as a text field that i can then use in my further calcluation ( somewhat like a reference of the summary field- if that makes sense?!)

             

            thanks

             

            Danielle

            • 3. Re: how to create a reference field?
              beverly

              The is calculated function called GetSummary() that does precisely what you want. Keep in mind that it will trigger a sort to get the result. Just remember in case you see the sort dialog (bigger data sets, likely) and wonder why when you have no scripted sorts (layout triggered or otherwise).

               

              -- sent from my iPhone4 --

              Beverly Voth

              --

              1 of 1 people found this helpful
              • 4. Re: how to create a reference field?
                LSNOVER

                As Bev and I have pointed out the GetSummary function is what you need. 

                 

                Examples

                GetSummary(Total Sales;Country) returns a summary of all records pertaining to the value in the Country field.

                GetSummary(Total Sales, if(Number of Countries > 1, Country, Sales Zone)) returns a summary of Total Sales by Country if Number of Countries is greater than 1. Otherwise, it returns a summary of Total Sales by Sales Zone.

                GetSummary(Total Sales;Total Sales) produces a summary of all records (similar to using a summary field, which is a total of total sales).

                If(ThisCharge > 3 * GetSummary(AvgCharge;Customer), “Verify this charge”, “ “) displays Verify this charge if the current charge is greater than three times the average charge.

                 

                Note if you use the total field for both parameters you will get the grand total, and I believe that may avoid the sorting issue (not 100% sure about that)

                 

                Regards,

                Lee

                • 5. Re: how to create a reference field?
                  danielle-gwa

                  thank you all i have this now done. thank you all for the help