[Openroad-users] problem with optionfields in a tablefield
Bodo Bergmann
Bodo.Bergmann at ingres.com
Tue Aug 21 22:19:33 EST 2007
The loading of the first optionfield is quite easy, e.g.:
initialize()=
declare
opt = OptionField DEFAULT NULL;
cha = ARRAY OF ChoiceItem DEFAULT NULL;
i = INTEGER NOT NULL;
enddeclare
{
opt = OptionField(StackField(FIELD(field3[*].column1).ProtoField).FieldByName(name='field1'));
cha = opt.ValueList.ChoiceItems;
cha.Clear();
i=1;
SELECT table_name AS cha[i].EnumText
FROM iitables
WHERE table_type = 'T'
ORDER BY 1
{
i=i+1;
};
COMMIT;
opt.UpdChoiceList();
}
The same way you can load the second optionfield field2.
The problem will be, if you need to have different choicelists for the field2 optionfields in each row of the tablefield,
depending on the selected value of field1 (e.g. in the example above field2 would have to display the columns of the table selected in field1).
As all the field2 optionfields share the same ProtoField, they usually have the same choicelist.
I don't know if this is your requirement, or if you just want to set the value of field2 depending on the value of field1 ???
Bodo.
Bodo Bergmann
Senior Software Engineer
OpenROAD Worldwide Development
Ingres Corp.
________________________________
From: openroad-users-bounces at peerlessit.com [mailto:openroad-users-bounces at peerlessit.com] On Behalf Of hans.weisenberger at mmm.com
Sent: Tuesday, August 21, 2007 1:56 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] problem with optionfields in a tablefield
3M Deutschland GmbH
Sitz: 41453 Neuss * Handelsregister: B 1878 Amtsgericht Neuss
Geschäftsführer: Jürgen Jaworski * Josef Mrozek * Theo Nöcker * Kurt-Henning Wiethoff * Managing Director: Kurt-Henning Wiethoff * Vorsitzender des Aufsichtsrates: Reinhold Hiersemann
________________________________
Just to translate my german mail to Bodo:
The problem ist to fill the first optionfield with values from a table.
Greetings Hans
hans.weisenberger at mmm.com
Sent by: openroad-users-bounces at peerlessit.com
21.08.2007 13:53
Please respond to
International OpenROAD Users <openroad-users at peerlessit.com>
To
International OpenROAD Users <openroad-users at peerlessit.com>
cc
Subject
Re: [Openroad-users] problem with optionfields in a tablefield
3M Deutschland GmbH
Sitz: 41453 Neuss * Handelsregister: B 1878 Amtsgericht Neuss
Geschäftsführer: Jürgen Jaworski * Josef Mrozek * Theo Nöcker * Kurt-Henning Wiethoff * Managing Director: Kurt-Henning Wiethoff * Vorsitzender des Aufsichtsrates: Reinhold Hiersemann
________________________________
Hallo Bodo,
die Aufgabenstellung ist, erst das eine Optionfield mit Werten aus der Datenbank zu befüllen.
Schon hier habe ich Schwierigkeiten, dieses Feld als Optionfield anzusprechen.
Wenn mir das gelingt, denke ich dass das zweite Problem, die abhängige Befüllung des
zweiten Optionfields auch funktionieren sollte.
Dank Dir für Deine Hilfe
Gruß
Hans
"Bodo Bergmann" <Bodo.Bergmann at ingres.com>
Sent by: openroad-users-bounces at peerlessit.com
21.08.2007 13:34
Please respond to
International OpenROAD Users <openroad-users at peerlessit.com>
To
"International OpenROAD Users" <openroad-users at peerlessit.com>
cc
Subject
Re: [Openroad-users] problem with optionfields in a tablefield
Try this:
ON CHILDSETVALUE field3[*].column1 =
DECLARE
row = INTEGER NOT NULL;
ENDDECLARE
{
IF CurFrame.TriggerField.Name = 'field1' THEN
row = FIELD(field3).WhichRow(cellfield = CurFrame.TriggerField);
// Set value of field2 depending on field1, e.g.:
field3[row].column1.field2 = field3[row].column1.field1;
ENDIF;
}
Regards,
Bodo.
Bodo Bergmann
Senior Software Engineer
OpenROAD Worldwide Development
Ingres Corp.
________________________________
From: openroad-users-bounces at peerlessit.com [mailto:openroad-users-bounces at peerlessit.com] On Behalf Of hans.weisenberger at mmm.com
Sent: Tuesday, August 21, 2007 11:49 AM
To: International OpenROAD Users
Subject: [Openroad-users] problem with optionfields in a tablefield
3M Deutschland GmbH
Sitz: 41453 Neuss * Handelsregister: B 1878 Amtsgericht Neuss
Geschäftsführer: Jürgen Jaworski * Josef Mrozek * Theo Nöcker * Kurt-Henning Wiethoff * Managing Director: Kurt-Henning Wiethoff * Vorsitzender des Aufsichtsrates: Reinhold Hiersemann
________________________________
Hi all,
I have the following problem in OR 4.1 on windows:
I have an tablefield (field3). In that tablefield there is one column (column1) with two optionfields (field1 and field2).
So when I click in the frameeditor I get: Optionfield 'field3[*].column1.field1' or Optionfield 'field3[*].column1.field1'
What I want is, depending on changing one optionfield, I want to change the other.
But all tries to adress one of the optionfield leads to compilationerrors.
Does anyone have an idea how to solve that?
Thanks and greetings
Hans Weisenberger=________________________________________________________________
OpenROAD-Users mailing list
You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users
To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe ________________________________________________________________
OpenROAD-Users mailing list
You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users
To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe
=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20070821/b2659b8e/attachment.html
More information about the Openroad-users
mailing list