Path: news.easynews.com!easynews!cyclone.swbell.net!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news-hog.berkeley.edu!ucberkeley!newsfeed.stanford.edu!postnews1.google.com!not-for-mail
From: luiscabral99@ig.com.br (Luis Cabral)
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.tools
Subject: Re: column total in forms
Date: 7 Jul 2002 10:06:19 -0700
Organization: http://groups.google.com/
Lines: 31
Message-ID: <c9ff1799.0207070906.7a211eac@posting.google.com>
References: <3D279D7F.90504@ivw.com>
NNTP-Posting-Host: 200.211.146.70
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1026061579 15268 127.0.0.1 (7 Jul 2002 17:06:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 7 Jul 2002 17:06:19 GMT
Xref: easynews comp.databases.oracle.misc:83905 comp.databases.oracle.tools:52263
X-Received-Date: Sun, 07 Jul 2002 10:03:39 MST (news.easynews.com)

Hi

You didn't tell your forms version, but if you use 6i (or 5, I think)
you can use a computed control item. See the "calculation" group of
item properties. You can create a summary computed item that
automatically SUMs the percentages, an in the pre-commit trigger you
can check if it is = 100...

hth

"Pieter J.D. Huiberts" <phuiberts-REMOVE@ivw.com> wrote in message news:<3D279D7F.90504@ivw.com>...
> Hello,
> I am developing a time distribution form in forms (dev/2000). The user 
> gets pressented its projects in rows, and can than assign how much of 
> his time (%) he spend on a project each month. Before committing this 
> info to the db, I would like to validate that the time totals to 100%. 
> How can I total these text_items before committing them into the db?
> 
> Is it possible to do something like total := row1 + row2 + row3, where 
> the cursor loops from the records?
> 
> example:
> The user sees this form and only fills out % of his time spend.
> Projects        Time (%)
> Project 1        33
> Project 2        33
> Project 3        33
>           Total    99%
> 
> Thanks a bunch,
> Piet
