Page 1 of 1

Possible Issue in subfile changed property

Posted: Wed Nov 06, 2013 7:57 am
by dieter
Hello,

we use version 4.6.6.

We tried to use the new "subfile changed" property in a grid. But it does not work. Maybe we made a mistake. We bound the property to a RPG field. In the debugger before the EXFMT the value if the field is ' ' (Blank). After the EXFMT the field remains ' '. So the field doesn't work. I am also wondering why the field is blank. It would expect that the field is '0' (or '1') because it is bound to an indicator. An indicator can never be blank.

I must say that in the subfile some fields have an separate "changed" property. Is the "global" subfile changed indicator only usable when no special indicators for fields are used? (I did not try that).

Dieter

Re: Possible Issue in subfile changed property

Posted: Wed Nov 06, 2013 6:35 pm
by Scott Klement
The field that you bind to the "subfile changed" property will be included in the subfile record. To check whether that record has been changed, you need to use CHAIN, READ, or similar opcode to load the subfile record, then you can check your bound field. Each subfile record has it's own copy of the bound field, so you need to read/check each one separately.

We added this feature to enable compatibility during DDS conversion.

There's not much reason to use it if you're writing a new application. You can just use the RPG READC opcode instead, which is much more flexible.

Re: Possible Issue in subfile changed property

Posted: Thu Nov 07, 2013 4:09 am
by dieter
Thank you, Scott.

This explains my problem.