Re: Oracle Power Objects-Combo Box-ValueList

From: Michael Kranzdorf <mikek_at_krt.com>
Date: 1995/08/22
Message-ID: <mikek-2208951725080001_at_franklin-tty8.jvnc.net>#1/1


In article <4159ot$69c_at_agate.berkeley.edu>, "Larry M. Jones" <ljones_at_mindseye.berkeley.edu> wrote:

> Can anyone tell me how to reference a field from a parent form in the
> where clause of a combo box valuelist in an embedded child form in OPO?
> I'm used to being able to do the following in the list of values in forms
> 3:
>
> select child_table.column1 from child_table
> where child_table.column2 = :parent_block.field
>
> I haven't found any way to reference the value shown in the parent form
> from a combobox ValueList in an embedded child form. It looks as if
>
> =select ... where child_table.column2 = frmParent.field_name.value
>
> ought to work, but the string frmParent... seems to be being passed to
> the server rather than the actual value of the parent field currently
> showing on the form.

I don't think you can do it from the child (though you should be able to). You do it from the controlling field when its value changes. Put this in the PostChange() method of frmParent.field_name:

inherited.postchange()
child_form.combo_name.valuelist = "=select column1 from child_table  where child_table.column2 = '" & self.value & "'"

You should also be able to do something similar in the LinkChgCurrentRec method of the child_form, but it doesn't seem to work. You can put a method there, but when you reference frmParent.field_name.value, you get the old value (before the actual record change happens). I think this is a bug. Anyone from Oracle/OPO reading this? Is this a bug or feature?

Regards,

Michael Kranzdorf                      ---           mikek_at_krt.com
Director of Information Systems        ---                NYSE:KRT
Kranzco Realty Trust                   ---            610.941.9292
Received on Tue Aug 22 1995 - 00:00:00 CEST

Original text of this message