Calculation Help

General support questions.
PostPosted: Wed May 17, 2006 6:50 am
I need help writing a calculation that is conditional. I have made a database for company bid prices on items and want to total up each company's bid separately. The one condition is I only want it to total up the items for each company that has been chosen for purchase. If the item has be chosen for purchase from a company it will have a "y" in a field next to the item and company. Any direction will help.

Thanks
SeedCode Staff
SeedCode Staff
Posts: 2759
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed May 17, 2006 9:07 am
Well this is kind of abstract, but you can handle this at the price level or at the bid level. At the price level you'd have a new price field that is really a calc, something like:

if ( Chosen = "Y" ; Amount ; 0 )

Then summing this field will get you the total amount of the chosen items.

At the bid level you could make a separate relationship between bids and items that was only true for chosen items; that means adding the "chosen" field to your relationship criteria somehow. Then you could have a sum calc in your bid that looks across this new relationship to sum the price of the chosen items:

sum (chosenitems::amount)

HTH.
John Sindelar
SeedCode

Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
support@seedcode.com
Follow us: