(newbie) Calculate balance from multiple records?

  • Follow


I have 2 databases - "Customer Details" & "Invoices".

I want to create a "Balance" field in the "Customer Details" database
that calculates the total amount owing of unpaid "Invoice" records?

Any suggestions appreciated.
0
Reply larry924 (1) 6/18/2004 2:22:49 PM

Sum (Invoice::Invoice_Amount)

Where Invoice is the relationship between "Customer Details" and
"Invoices" and Invoice_Amount is the total of each invoice.

-Scott in SoCal


Larry <larry@none.com> wrote in message news:<180620042352494804%larry@none.com>...
> I have 2 databases - "Customer Details" & "Invoices".
> 
> I want to create a "Balance" field in the "Customer Details" database
> that calculates the total amount owing of unpaid "Invoice" records?
> 
> Any suggestions appreciated.
0
Reply scott_davis_ 6/18/2004 10:54:46 PM


Thanks Scott

When creating a relationship between "Customer Details" and "Invoices"
should I Match data from "Customer_Name" field  in "Customer Details"
database with "Invoice_Amount" field in "Invoices"database?

This didn't work. I assume the calculated "Balance" field will update
automatically?

Larry


In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
Davis <scott_davis_@hotmail.com> wrote:

> Sum (Invoice::Invoice_Amount)
> 
> Where Invoice is the relationship between "Customer Details" and
> "Invoices" and Invoice_Amount is the total of each invoice.
> 
> -Scott in SoCal
> 
> 
> Larry <larry@none.com> wrote in message
> news:<180620042352494804%larry@none.com>...
> > I have 2 databases - "Customer Details" & "Invoices".
> > 
> > I want to create a "Balance" field in the "Customer Details" database
> > that calculates the total amount owing of unpaid "Invoice" records?
> > 
> > Any suggestions appreciated.
0
Reply Larry 6/19/2004 1:08:31 PM

Okay I got it. Match Customer_Name with Customer_Name.

Thanks again.


In article <190620042238313315%larry@none.com>, Larry <larry@none.com>
wrote:

> Thanks Scott
> 
> When creating a relationship between "Customer Details" and "Invoices"
> should I Match data from "Customer_Name" field  in "Customer Details"
> database with "Invoice_Amount" field in "Invoices"database?
> 
> This didn't work. I assume the calculated "Balance" field will update
> automatically?
> 
> Larry
> 
> 
> In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
> Davis <scott_davis_@hotmail.com> wrote:
> 
> > Sum (Invoice::Invoice_Amount)
> > 
> > Where Invoice is the relationship between "Customer Details" and
> > "Invoices" and Invoice_Amount is the total of each invoice.
> > 
> > -Scott in SoCal
> > 
> > 
> > Larry <larry@none.com> wrote in message
> > news:<180620042352494804%larry@none.com>...
> > > I have 2 databases - "Customer Details" & "Invoices".
> > > 
> > > I want to create a "Balance" field in the "Customer Details" database
> > > that calculates the total amount owing of unpaid "Invoice" records?
> > > 
> > > Any suggestions appreciated.
0
Reply Larry 6/20/2004 2:27:24 PM

Larry wrote:
> Okay I got it. Match Customer_Name with Customer_Name.
> 
> Thanks again.
> 
> 
> In article <190620042238313315%larry@none.com>, Larry <larry@none.com>
> wrote:
> 
> 
>>Thanks Scott
>>
>>When creating a relationship between "Customer Details" and "Invoices"
>>should I Match data from "Customer_Name" field  in "Customer Details"
>>database with "Invoice_Amount" field in "Invoices"database?
>>
>>This didn't work. I assume the calculated "Balance" field will update
>>automatically?
>>
>>Larry
>>
>>
>>In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
>>Davis <scott_davis_@hotmail.com> wrote:
>>
>>
>>>Sum (Invoice::Invoice_Amount)
>>>
>>>Where Invoice is the relationship between "Customer Details" and
>>>"Invoices" and Invoice_Amount is the total of each invoice.
>>>
>>>-Scott in SoCal
>>>
>>>
>>>Larry <larry@none.com> wrote in message
>>>news:<180620042352494804%larry@none.com>...
>>>
>>>>I have 2 databases - "Customer Details" & "Invoices".
>>>>
>>>>I want to create a "Balance" field in the "Customer Details" database
>>>>that calculates the total amount owing of unpaid "Invoice" records?
>>>>
>>>>Any suggestions appreciated.


You should (always) use a unique ID field for this sort of match. What 
happens if you have two customers with the same name?  Create a 
Customer_ID and make it a unique auto enter serial  e.g. C00001 
increment 1, you can use replace command to enter value series for 
existing records. The C prefix has advantages; it can prevent sort 
problems, avoid sort issues and help admin in complex keys... and the 
00001 allows one short of 100,000 customers before it glitches.  You 
also have a Unique Invoice_ID no?



Chris Brown
Neurosurgery
University of Adelaide

0
Reply Chris 6/21/2004 12:05:27 AM

In article <40d62644@yorrell.saard.net>, Chris Brown
<cbrown@medicine.adelaide.edu.au> wrote:
<snip>
> You should (always) use a unique ID field for this sort of match. What 
> happens if you have two customers with the same name?  Create a 
> Customer_ID and make it a unique auto enter serial  e.g. C00001 
> increment 1, you can use replace command to enter value series for 
> existing records. The C prefix has advantages; it can prevent sort 
> problems, avoid sort issues and help admin in complex keys... and the 
> 00001 allows one short of 100,000 customers before it glitches.  You 
> also have a Unique Invoice_ID no?
> 
> Chris Brown
> Neurosurgery
> University of Adelaide
> 

That sounds like a WISE idea, thanks for your input.
Larry
0
Reply Larry 6/21/2004 11:18:11 AM

Personally, I don't see any advantages to using anything but numbers
for primary keys.  Could you give an example of when a prefix would be
useful?

Chris Brown <cbrown@medicine.adelaide.edu.au> wrote in message news:<40d62644@yorrell.saard.net>...
> Larry wrote:
> > Okay I got it. Match Customer_Name with Customer_Name.
> > 
> > Thanks again.
> > 
> > 
> > In article <190620042238313315%larry@none.com>, Larry <larry@none.com>
> > wrote:
> > 
> > 
> >>Thanks Scott
> >>
> >>When creating a relationship between "Customer Details" and "Invoices"
> >>should I Match data from "Customer_Name" field  in "Customer Details"
> >>database with "Invoice_Amount" field in "Invoices"database?
> >>
> >>This didn't work. I assume the calculated "Balance" field will update
> >>automatically?
> >>
> >>Larry
> >>
> >>
> >>In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
> >>Davis <scott_davis_@hotmail.com> wrote:
> >>
> >>
> >>>Sum (Invoice::Invoice_Amount)
> >>>
> >>>Where Invoice is the relationship between "Customer Details" and
> >>>"Invoices" and Invoice_Amount is the total of each invoice.
> >>>
> >>>-Scott in SoCal
> >>>
> >>>
> >>>Larry <larry@none.com> wrote in message
> >>>news:<180620042352494804%larry@none.com>...
> >>>
> >>>>I have 2 databases - "Customer Details" & "Invoices".
> >>>>
> >>>>I want to create a "Balance" field in the "Customer Details" database
> >>>>that calculates the total amount owing of unpaid "Invoice" records?
> >>>>
> >>>>Any suggestions appreciated.
> 
> 
> You should (always) use a unique ID field for this sort of match. What 
> happens if you have two customers with the same name?  Create a 
> Customer_ID and make it a unique auto enter serial  e.g. C00001 
> increment 1, you can use replace command to enter value series for 
> existing records. The C prefix has advantages; it can prevent sort 
> problems, avoid sort issues and help admin in complex keys... and the 
> 00001 allows one short of 100,000 customers before it glitches.  You 
> also have a Unique Invoice_ID no?
> 
> 
> 
> Chris Brown
> Neurosurgery
> University of Adelaide
0
Reply scott_davis_ 6/21/2004 8:11:24 PM

example; building complex keys, looking at tables of records as an admin 
the pattern is a visual reinforcement when looking for errors, and is 
real handy when building them to confirm the right sequences are going in
  C000356 R7654 P0006 H00456 A99973
)client/referral/procedure/hospital/account...)

it also means you can easily identify the component ID in  a problem 
record you want to go off and look at in the relevant table

And so that nobody starts thinking what is wrong with initial design, 
that these sorts of problems arise to start with; when you inherit 
existing solutions, that have mutated over years, there can be a zillion 
inconsistencies in what was entered.



sorting
serial numbers often becomes necessary to become serial text, there are 
situations where conversion will drop leading zeroes, looking at admin 
tables of thousands of records when data scrubbing is a lot easier if 
every record value has the same format ( 7, 5, 5, 6, 6 as above)


sort 1.2.3....9.10.11, rather than 1, 10, 100, 2, 3, 4, 400...





Scott Davis wrote:

> Personally, I don't see any advantages to using anything but numbers
> for primary keys.  Could you give an example of when a prefix would be
> useful?
> 
> Chris Brown <cbrown@medicine.adelaide.edu.au> wrote in message news:<40d62644@yorrell.saard.net>...
> 
>>Larry wrote:
>>
>>>Okay I got it. Match Customer_Name with Customer_Name.
>>>
>>>Thanks again.
>>>
>>>
>>>In article <190620042238313315%larry@none.com>, Larry <larry@none.com>
>>>wrote:
>>>
>>>
>>>
>>>>Thanks Scott
>>>>
>>>>When creating a relationship between "Customer Details" and "Invoices"
>>>>should I Match data from "Customer_Name" field  in "Customer Details"
>>>>database with "Invoice_Amount" field in "Invoices"database?
>>>>
>>>>This didn't work. I assume the calculated "Balance" field will update
>>>>automatically?
>>>>
>>>>Larry
>>>>
>>>>
>>>>In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
>>>>Davis <scott_davis_@hotmail.com> wrote:
>>>>
>>>>
>>>>
>>>>>Sum (Invoice::Invoice_Amount)
>>>>>
>>>>>Where Invoice is the relationship between "Customer Details" and
>>>>>"Invoices" and Invoice_Amount is the total of each invoice.
>>>>>
>>>>>-Scott in SoCal
>>>>>
>>>>>
>>>>>Larry <larry@none.com> wrote in message
>>>>>news:<180620042352494804%larry@none.com>...
>>>>>
>>>>>
>>>>>>I have 2 databases - "Customer Details" & "Invoices".
>>>>>>
>>>>>>I want to create a "Balance" field in the "Customer Details" database
>>>>>>that calculates the total amount owing of unpaid "Invoice" records?
>>>>>>
>>>>>>Any suggestions appreciated.
>>
>>
>>You should (always) use a unique ID field for this sort of match. What 
>>happens if you have two customers with the same name?  Create a 
>>Customer_ID and make it a unique auto enter serial  e.g. C00001 
>>increment 1, you can use replace command to enter value series for 
>>existing records. The C prefix has advantages; it can prevent sort 
>>problems, avoid sort issues and help admin in complex keys... and the 
>>00001 allows one short of 100,000 customers before it glitches.  You 
>>also have a Unique Invoice_ID no?
>>
>>
>>
>>Chris Brown
>>Neurosurgery
>>University of Adelaide

0
Reply Chris 6/22/2004 3:41:23 AM

I try to create one table for each entity and then use cross-reference
tables for many-to-many relationships.  Unfortunately, Filemaker
pre-Version 7 pushes you to use fewer tables (having to configure
security on each file, pushing the limit on number of files that
Filemaker Server can host, etc.).  I see your point though.  Thanks
for the info!

Chris Brown <cbrown@medicine.adelaide.edu.au> wrote in message news:<40d7aa60$1@yorrell.saard.net>...
> example; building complex keys, looking at tables of records as an admin 
> the pattern is a visual reinforcement when looking for errors, and is 
> real handy when building them to confirm the right sequences are going in
>   C000356 R7654 P0006 H00456 A99973
> )client/referral/procedure/hospital/account...)
> 
> it also means you can easily identify the component ID in  a problem 
> record you want to go off and look at in the relevant table
> 
> And so that nobody starts thinking what is wrong with initial design, 
> that these sorts of problems arise to start with; when you inherit 
> existing solutions, that have mutated over years, there can be a zillion 
> inconsistencies in what was entered.
> 
> 
> 
> sorting
> serial numbers often becomes necessary to become serial text, there are 
> situations where conversion will drop leading zeroes, looking at admin 
> tables of thousands of records when data scrubbing is a lot easier if 
> every record value has the same format ( 7, 5, 5, 6, 6 as above)
> 
> 
> sort 1.2.3....9.10.11, rather than 1, 10, 100, 2, 3, 4, 400...
> 
> 
> 
> 
> 
> Scott Davis wrote:
> 
> > Personally, I don't see any advantages to using anything but numbers
> > for primary keys.  Could you give an example of when a prefix would be
> > useful?
> > 
> > Chris Brown <cbrown@medicine.adelaide.edu.au> wrote in message news:<40d62644@yorrell.saard.net>...
> > 
> >>Larry wrote:
> >>
> >>>Okay I got it. Match Customer_Name with Customer_Name.
> >>>
> >>>Thanks again.
> >>>
> >>>
> >>>In article <190620042238313315%larry@none.com>, Larry <larry@none.com>
> >>>wrote:
> >>>
> >>>
> >>>
> >>>>Thanks Scott
> >>>>
> >>>>When creating a relationship between "Customer Details" and "Invoices"
> >>>>should I Match data from "Customer_Name" field  in "Customer Details"
> >>>>database with "Invoice_Amount" field in "Invoices"database?
> >>>>
> >>>>This didn't work. I assume the calculated "Balance" field will update
> >>>>automatically?
> >>>>
> >>>>Larry
> >>>>
> >>>>
> >>>>In article <e10f5973.0406181454.15ef105a@posting.google.com>, Scott
> >>>>Davis <scott_davis_@hotmail.com> wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Sum (Invoice::Invoice_Amount)
> >>>>>
> >>>>>Where Invoice is the relationship between "Customer Details" and
> >>>>>"Invoices" and Invoice_Amount is the total of each invoice.
> >>>>>
> >>>>>-Scott in SoCal
> >>>>>
> >>>>>
> >>>>>Larry <larry@none.com> wrote in message
> >>>>>news:<180620042352494804%larry@none.com>...
> >>>>>
> >>>>>
> >>>>>>I have 2 databases - "Customer Details" & "Invoices".
> >>>>>>
> >>>>>>I want to create a "Balance" field in the "Customer Details" database
> >>>>>>that calculates the total amount owing of unpaid "Invoice" records?
> >>>>>>
> >>>>>>Any suggestions appreciated.
> >>
> >>
> >>You should (always) use a unique ID field for this sort of match. What 
> >>happens if you have two customers with the same name?  Create a 
> >>Customer_ID and make it a unique auto enter serial  e.g. C00001 
> >>increment 1, you can use replace command to enter value series for 
> >>existing records. The C prefix has advantages; it can prevent sort 
> >>problems, avoid sort issues and help admin in complex keys... and the 
> >>00001 allows one short of 100,000 customers before it glitches.  You 
> >>also have a Unique Invoice_ID no?
> >>
> >>
> >>
> >>Chris Brown
> >>Neurosurgery
> >>University of Adelaide
0
Reply scott_davis_ 6/22/2004 5:30:37 PM

8 Replies
249 Views

(page loaded in 0.109 seconds)

Similiar Articles:











7/8/2012 12:33:03 PM


Reply: