Subject RE: [IBO] calculated field vs computed
Author Alan McDonald
> option 1. in they T_query1.sql I will put select *, "qty"*"price"
> as "subtotal" from "table 1"
> option 2. in they T_query1.calculated fields properties will I
> declare the "subtotal" field.
> option 3. Iam not so sure if this is possible, under the column
> attributes I will add a new field "subtotal" then check the computed
> check box.
> What is the use of the computed attributes under the column
> attributes besides from when we are using it for setting up a
> TIB_lookupcombo
> please explain the option you think is the best practice.

Best practice? Not sure there is only one best way to do this. Triggers is
one way but personally I use your first option exclusively. I select the
total (BTW this isn't a subtotal since you are not totalling a number of
rows). You would need another query to give you a subtotal of select
sum(qty*price) from table where .... etc.
The computed attribute is their in IBO so that automatic update sql
statements (generated by IBO at runtime) do not try to include an update for
this caculatd field.