Re: Help needed with a FMP 7 Calculation question please
- From: Peter <nomail@xxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 16:41:39 +0200
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
.
- Follow-Ups:
- Re: Help needed with a FMP 7 Calculation question please
- From: Nick Talley
- Re: Help needed with a FMP 7 Calculation question please
- References:
- Help needed with a FMP 7 Calculation question please
- From: Nick Talley
- Help needed with a FMP 7 Calculation question please
- Prev by Date: Re: Help needed with a FMP 7 Calculation question please
- Next by Date: finding within two fields
- Previous by thread: Re: Help needed with a FMP 7 Calculation question please
- Next by thread: Re: Help needed with a FMP 7 Calculation question please
- Index(es):
Relevant Pages
|