6 Replies Latest reply on Mar 8, 2012 10:15 PM by chawks1995

    Merge Field Displays Incorrect Information

    chawks1995

      Title

      Merge Field Displays Incorrect Information

      Post

      Hello All,

       

      I have a strange problem that I haven't been able to figure out:

      I have an order form layout which is only used in 'Preview' mode. This order form has several merge fields that display common items such as:

      Non-Taxable Sales

      Taxable Sales

      Sub-Total ... etc.

       

      The calculated field in my Orders Table that manages the calculation of the 'Non-Taxable' sales total works great, but the 'Taxable' sales total field does something funny. If there are no 'Taxable' line items on the order it displays the value of the 'Non-Taxable' sales total but only on the layout which is only shown in 'Preview' mode - this layout is of course the one that the user prints the order from at the end of the order entry process. However, even though the 'Taxable' sales total merge field field mirrors the value of the 'Non-Taxable' sales total the 'Total Value' or the order is not affected - it displays the correct amount of the order.

      There is a further twist to this story. If an order DOES have taxable line items then the 'Non-Taxable' sales total merge field displays the correct value on the aforementioned layout in 'Preview' mode and the 'Total Value' displays the correct amount too. You are good to go!

      Example1: Non-Taxable Sales Only - All fields are merge fields:

      Line Item    Item    Description            Value   Taxable

      1                LBR     Design Labor          $90.00   No

      Non-Taxable Sales: $90.00

      Taxable-Sales: $90.00 <- No Good :(

      Order Total: $90.00

       

      Example2: Non-Taxable & Non-Taxable Sales - All fields are merge fields:

      Line Item    Item    Description            Value   Taxable

      1                LBR     Design Labor          $90.00   No

      2                MAT     Plotting Paper         $60.00   Yes

      Non-Taxable Sales: $90.00

      Taxable-Sales: $60.00

      Order Total: $150.00  [It Works!]

      -------------------------------------------

      Here are my Fields and corresponding calculations - aslo, attached is a brief mock-up of my basic order table structure:

       

      MATERIALS TABLE
      ------------------------------------------
      Item_TaxableStatus (Number Field)


      ORDER_LINEITEM TABLE
      ------------------------------------------
      zTaxableAmount Calculated Field:
      Calculation: If ( Item_TaxableStatus = 1 ; zz_ExtendedPrice ; 0 )

      zNonTaxableAmount Calculated Field:
      Calculation: If ( Item_TaxableStatus= 0 ; zz_ExtendedPrice ; 0 )

      ORDERS TABLE
      ------------------------------------------
      zTotalTaxableAmount Calculated Field:
      Calculation: Round ( Sum ( Order_LINEITEM::zTaxableAmount ) ; 2 )

      zTotalNonTaxableAmount Calculated Field:
      Calculation: Round ( Sum ( Order_LINEITEM::zNonTaxableAmount ) ; 2 )

       

      Thanks in advance to the community for helping me with this interesting problem!!

       

      chawks1995

      3/5/2012

       

      FM1.jpg

        • 1. Re: Merge Field Displays Incorrect Information
          philmodjunk

          Nothing is obviously wrong in your set up. A screen shot of manage | Database | Relationships would help. I may be wrong here quite easily, but I suspect an issue with the table occurrences specified in the relationships and then in the layout on which you have set this up.

          In Layout Setup | Show Records From, what is selected? (Exact text can be critical here)

          How does that table occurrence specified in that drop down link to the others from which you have specified fields on this layout?

          • 2. Re: Merge Field Displays Incorrect Information
            chawks1995

            Hey Phil,

            The layout that is used to Preview and Print the order is based on the "Order_Segment" Table. I've attached a Grab of the Relationship Table and have highlighted the used tables for reference.

            It's really interesting because everything basically works - it's just that mirroring of 'Non-Taxable' sales when there are no taxable lineitems - add a taxable item to the order and you are good to go :)

             

            Thanks for your input - chawks1995

            • 3. Re: Merge Field Displays Incorrect Information
              philmodjunk

              Sorry, but there's no attachment visible. Uploaded files must be of type jpg, png or gif. Other file types will not be visible when uploaded to the forum. Other file types can be made accessible if you upload them to a file sharing site and then post the down load link here.

              • 5. Re: Merge Field Displays Incorrect Information
                philmodjunk

                And now I see it twice. It must take longer for uploaded image files to appear than the text message with which they are associated. Either that or recent "fixes" by RightNow have introduced yet another bug in the system.

                So the layout is based on Order_Segments when you check Layout Setup | Show Records From?

                The merge field is Segment_NonTaxableAmount and was selected from Order_Segments when you added it to the layout?

                When you open the specify Calculation dialog, is Order_Segments selected in the "context" drop down at the top of the dialog box?

                Why is OrdersManagement highLighted?

                • 6. Re: Merge Field Displays Incorrect Information
                  chawks1995

                  Phil,

                  Yup, the 'Preview' form is based on 'Order_Segment' - but guess what, I just deleted the merge field from the form and re-inserted it - now it works. I swear I did that previously - go figure - ha!

                  I'm running the FM database on my Mac at home via FM Server - maybe I should test it tomorrow on our Windows clients just to make sure we're gold?

                  Fun stuff - I'll post an update to close the thread - thanks a mil' Phil :)

                  chawks1995