|
From: Kenneth D. <ke...@se...> - 2009-05-22 17:07:10
|
I've made a new feature for column calculation chains. This was needed
by Jeff for our mutual customer.
With this feature you can now put a Postgres function into a chain
return argument.
The rules are:
1) Start the return value with an "!"
2) Prefix column names with "!", not with "@"
This only works on the return value, not the compare value.
Example:
module test:
description: Ken Test Stuff
column xday:
type_id: numb
colprec: 2
column xmonth:
type_id: numb
colprec: 2
table chaintests:
module: test
description: Chain Tests
column recnum:
primary_key: Y
column date_1:
suffix: _1
description: A Date
uisearch: Y
column xday:
uisearch: Y
description: The Day of Month
chain calc:
test 01:
return: !extract(day from !date_1)
column xmonth:
description: The Month
chain calc:
test 01:
return: !extract(month from !date_1)
column year:
description: The Year
chain calc:
test 00:
return: !extract(year from !date_1)
column cnt:
description: Calculation
chain calc:
test 00:
compare: @xmonth > 5
return: @xday * @xmonth
test 01:
return: @xmonth * @year
--
Kenneth Downs
Secure Data Software
ke...@se... www.andromeda-project.org www.secdat.com
Office: 631-689-7200
Cell: 631-379-0010
Fax: 631-689-0527
|