1 Reply Latest reply on Mar 26, 2013 2:21 PM by philmodjunk

    How do i enter info into a sub summary?

    Kirk_1

      Title

      How do i enter info into a sub summary?

      Post

           Here is the background.

           I'm working on invoices. Some of my customers ask for one statement on all of the transactions per day. These same customers have multiple locations to add to the mix.

           I've created an "order" table, so i can put the order ID into the transactions to tie them together.

           It works,  i create some of the transactions during the day and put the order ID's into each transaction.

           Other transactions come in EDI/import and i need to put order ID's in the EDI transactions.

           I've created a sub summary that will produce my found set based on posting the transaction that day, sorting by the bill to customer ID numbers.

           I will use a set varable and set field,  to put the order ID into the transaction, once i get if figured out.

           The sub summary is doing it's job, they are sorted by the bill to ID's and I've put a count in so i know how many invoices per customer... 

           I can't figure out how to work my way through the list and distinguish between the several bill to ID's, and enter the order ID for that customer.

           With that order ID i can receive my customers check for the statement and not the transactions.

           Any ideas?

            

        • 1. Re: How do i enter info into a sub summary?
          philmodjunk

               Ideally you should have a separate table where each record receives a unique Order ID which then links to this table. Then you can set a script to loop through your records assigning order ID's  each time the bill to ID changes. You can either save the previous Bill to ID in a variable or you can use getNthRecord to examine the value in the preceding or next record to identify when the value changes.

               Each time you need a new order ID, you create a new record in this added table, put the OrderID of the new record in a variable and then return to your orginal layout set it's order ID field to the value in the variable until the bill to ID changes.