Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Calculated Fields
Thu, Apr 22 2010 12:24 PMPermanent Link

Yavuz Ozdemir

GEMAS A.S.

Hi,

I write below procedure:

PROCEDURE "HList"
BEGIN
 DECLARE MyCursor SENSITIVE CURSOR WITH RETURN FOR Stmt;
 PREPARE Stmt FROM 'select a.*,
                   IF(a.HID is null then '''' else
                         (select b.DESC from HS b where (b.ID=a.HID))) as HNAME,
                   from HITEMS a order by a.ID';
 OPEN MyCursor;
END

i think that HNAME is calculated field, am I right?

if HID is changed, is system recalculate HNAME before or after post? When i try to this procudure HNAME recalculates after post. Is there any option to recalculate HNAME after assigning new value to HID without post?

Thanks

Yavuz
Mon, Apr 26 2010 7:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Yavuz,

<< i think that HNAME is calculated field, am I right? >>

Yes.  The rules are:

1) If the expression contains functions or sub-queries, then it is
implemented as a generated column server-side.  This means that it will only
get updated once the row is actually updated.

2) If the expression doesn't contain functions or sub-queries, then it is
implemented as a computed column client-side.  This means that it will get
updated any time any referenced columns are updated, in real-time.

<< if HID is changed, is system recalculate HNAME before or after post? When
i try to this procudure HNAME recalculates after post. Is there any option
to recalculate HNAME after assigning new value to HID without post? >>

Not currently.  I can put in such a request for 2.04, however.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image