dbTalk Databases Forums  

Help needed with a FMP 7 Calculation question please

comp.databases.filemaker comp.databases.filemaker


Discuss Help needed with a FMP 7 Calculation question please in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nick Talley
 
Posts: n/a

Default Help needed with a FMP 7 Calculation question please - 07-21-2005 , 05:57 AM






My database includes a table that holds 100's of inventory records.

I need to find a way to show the total inventory value in a portal on a
separate layout.

I cant figure out how to do this, can anyone help please.

Each record has the following fields
:Net Value
:Items On Hand
: Total Stock Value (Items On Hand*Net Value)

So basically how to I make a calculation to add the totals of :Total Stock
Value for each record to show a grand total in a portal?

I have a need for this type of calculation for other fields. As soon as I
know how to do this one the rest should be easy, any help would be greatly
appreciated.

Nick Talley




Reply With Quote
  #2  
Old   
Nick Talley
 
Posts: n/a

Default Re: Help needed with a FMP 7 Calculation question please - 07-21-2005 , 09:39 AM






Hi Martin

I am afraid that I am more confused now ;-)

The : Total Stock Value (Items On Hand*Net Value) works fine to show the
total value in stock of a single inventory item but I just need to be able
to show the total of all inventory added together.

What I need is a kind of summary layout to show totals of various fields to
give me a snapshot of my stock.

Regards
Nick
"Martin Trautmann" <t-use (AT) gmx (DOT) net> wrote

Quote:
On Thu, 21 Jul 2005 10:57:27 +0000 (UTC), Nick Talley wrote:
I need to find a way to show the total inventory value in a portal on a
separate layout.

That's the error. Summaries are intended on records, not on record
parts.

So you have to fix this error by a workaround.

Each record has the following fields
:Net Value
:Items On Hand
: Total Stock Value (Items On Hand*Net Value)

I don't see where a summary or portal problem comes in here.

What's wrong about the simple calculation [Items On Hand*Net Value]?

So basically how to I make a calculation to add the totals of :Total
Stock
Value for each record to show a grand total in a portal?

So here's the summary? You just want a total summary across everything,
not breaking on something such as in stock/out of stock?

So what's the value shown for a summary field Summarized Total Stock Value
summarize: add of [Total Stock Value]
where Total Stock Value has to be of type number?

I might suggest to sort the items properly and set a 'global summary'
by the result of [GetSummary(Summarized Total Stock Value, your break
field)]. But I don't know yet whether you actually need some kind of
grouping (and sorting!) your records.

- Martin



Reply With Quote
  #3  
Old   
Peter
 
Posts: n/a

Default Re: Help needed with a FMP 7 Calculation question please - 07-21-2005 , 09:41 AM



On Thu, 21 Jul 2005 10:57:27 +0000 (UTC), Nick Talley wrote :

Quote:
My database includes a table that holds 100's of inventory records.

I need to find a way to show the total inventory value in a portal on a
separate layout.

I cant figure out how to do this, can anyone help please.

Each record has the following fields
:Net Value
:Items On Hand
: Total Stock Value (Items On Hand*Net Value)

So basically how to I make a calculation to add the totals of :Total Stock
Value for each record to show a grand total in a portal?

I have a need for this type of calculation for other fields. As soon as I
know how to do this one the rest should be easy, any help would be greatly
appreciated.

Nick Talley
Hi Nick,

I assume you would like your portal to show something like :

Desc qty price total
Item A 4 5 20
Item B 6 3 18
Total Stock 38

For the explanation, I will name the table in which you want to create the
portal "Main" and the table holding the actual stock info "Stock". If you
want a portal like the above, the "Total Stock" field is best made in the
"Main" table. Also, it should not be part of the portal but placed outside
the portal.

Now it depends a little how you want to view your stock records. Do you
simply wish to view the entire list of "Stock" records from each "Main"
record ? Then you simply create a calculation field in Stock and Main, and
define the calculation as "1" (without the quotes). Now, create a
relationship from Main to Stock, based on this Constant field. This will
cause all records in Main to become related to all records in Stock
(meaning you can see them all, no matter in which record in Main you are).
Let's call this relationship "ViewStock"

Now, in Main, create a calculation field, and define it as :
Sum (ViewStock::total)

This calculation field will now return the value of the sum of the stock of
all related records (which are all records in "Stock"). Place it below the
portal and you're done.

Now, it is possible that you want to view different (filtered) totals,
depending on which record you are in Main, but then you have to tell me a
little more about how your database is set up.

HTH,

Peter


Reply With Quote
  #4  
Old   
Nick Talley
 
Posts: n/a

Default Re: Help needed with a FMP 7 Calculation question please - 07-21-2005 , 11:23 AM



Hi Peter

Thanks, I will give this a try this evening & let you know how I get on.

Regards
Nick
"Peter" <nomail (AT) homeorwork (DOT) tnx> wrote

Quote:
On Thu, 21 Jul 2005 10:57:27 +0000 (UTC), Nick Talley wrote :

My database includes a table that holds 100's of inventory records.

I need to find a way to show the total inventory value in a portal on a
separate layout.

I cant figure out how to do this, can anyone help please.

Each record has the following fields
:Net Value
:Items On Hand
: Total Stock Value (Items On Hand*Net Value)

So basically how to I make a calculation to add the totals of :Total
Stock
Value for each record to show a grand total in a portal?

I have a need for this type of calculation for other fields. As soon as I
know how to do this one the rest should be easy, any help would be
greatly
appreciated.

Nick Talley

Hi Nick,

I assume you would like your portal to show something like :

Desc qty price total
Item A 4 5 20
Item B 6 3 18
Total Stock 38

For the explanation, I will name the table in which you want to create the
portal "Main" and the table holding the actual stock info "Stock". If you
want a portal like the above, the "Total Stock" field is best made in the
"Main" table. Also, it should not be part of the portal but placed outside
the portal.

Now it depends a little how you want to view your stock records. Do you
simply wish to view the entire list of "Stock" records from each "Main"
record ? Then you simply create a calculation field in Stock and Main, and
define the calculation as "1" (without the quotes). Now, create a
relationship from Main to Stock, based on this Constant field. This will
cause all records in Main to become related to all records in Stock
(meaning you can see them all, no matter in which record in Main you are).
Let's call this relationship "ViewStock"

Now, in Main, create a calculation field, and define it as :
Sum (ViewStock::total)

This calculation field will now return the value of the sum of the stock
of
all related records (which are all records in "Stock"). Place it below the
portal and you're done.

Now, it is possible that you want to view different (filtered) totals,
depending on which record you are in Main, but then you have to tell me a
little more about how your database is set up.

HTH,

Peter



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.