8 Replies Latest reply on Dec 1, 2010 4:09 PM by philmodjunk

    Pulling Information



      Pulling Information


      I want to certain information from a certain field in 1 layout to another layout in a certain field. What kind of script would i need for that

        • 2. Re: Pulling Information

          Set Field may or may not be needed and you may need more steps than just Set Field. You may, in fact, not need any script at all. It depends on the design of your database. Do both layouts refer to the same table occurrence (box in your relationship graph)? If not, are they related? How?

          • 3. Re: Pulling Information

            Well there both related by invoice number and line items what im trying to do is get the total discount number from 1 box in my Category discount layout and then pull it to another box in my invoice layout.

            • 4. Re: Pulling Information

              "Well [They're] both related by invoice number and line items"

              Sorry but that's just a bit vague. Exactly how are they related? (What fields in one table match to fields in the other?)

              Does a record in the category discount table compute the discount? A flat fee discount? A percentage? Is it computed based on total sales for the current invoice?

              I think you have at least three tables involved here but could be wrong:


              • 5. Re: Pulling Information

                The Category ID_invoice subtotals Order totals pretty much everything in the line items table

                • 6. Re: Pulling Information

                  That doesn't really answer my questions and generates new ones:

                  What is Category ID_Invoice? A field? A table?

                  If it's a field, how is it defined?

                  If it's a table, what's the relationship like that links it to line items?

                  • 7. Re: Pulling Information

                    Ok i mean the things that both layouts share is




                    Order totals

                    ID_invoice---<Lineitems>---- Category discounts

                    Both are linked with the ID_invoice the discount layout is category summary that gives me the subtotals for each category then i have a discount lin that discounts from that subtotal. at teh trailing grand summary i have a total discount box which is a summary field that totals the discounts for all the category. now what i want to do is pull that number into my invoice page so i can use it to minus the grand total and get my new grand total

                    • 8. Re: Pulling Information

                      Still not totally clear here.

                      Are these the relationships that you have?

                      Invoices::InvoiceID = LineItems::InvoiceID

                      CategoryDiscounts::InvoiceID = LineItems::InvoiceID AND
                      CategoryDiscounts::Category = LineItems::Category.

                      I've deliberately not talked in terms of layouts as that's yet another detail that can't be dealt with until I understand the specific details of how you've linked your tables.