I tried
layout.getGroupField("REC", "GROUP1 (1)", "FIELDX");
and
layout.getGroupField("REC", "GROUP1", "FIELDX (1)");
But both versions don't seem to find the field. As i never worked with occurs fields before i am not sure about the correct way to get the fieldDetail espacially as i have to adress it with it's group name, as it may occur in more then one group in the copybook.
Last edit: Bruce Martin 2015-08-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
May be i found nd the solution by dumping the fieldDetail incl. GroupName.
The correct way seems to be:
layout.getGroupField("REC", "GROUP1 (1)", "FIELDX (1)");
So the index has to be used on both group and field. Rather odd...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also with getGroupField you do not need to specify every Group level. Only specify the minimum to fully qualify the name. It tries to follow the "Cobol" convention.
Reasoning:
In Cobol adding in a Group level does not cause a problem, so people do it without thinking about it e.g.
05 Birth-Datapic 9(8).
becomes
05 Birth-Data-X.07 Birth-Datapic 9(8).
Last edit: Bruce Martin 2015-08-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again,
another question:
How do i address a field in an occurs section?
My copybook is like this:
I tried
layout.getGroupField("REC", "GROUP1 (1)", "FIELDX");
and
layout.getGroupField("REC", "GROUP1", "FIELDX (1)");
But both versions don't seem to find the field. As i never worked with occurs fields before i am not sure about the correct way to get the fieldDetail espacially as i have to adress it with it's group name, as it may occur in more then one group in the copybook.
Last edit: Bruce Martin 2015-08-14
May be i found nd the solution by dumping the fieldDetail incl. GroupName.
The correct way seems to be:
layout.getGroupField("REC", "GROUP1 (1)", "FIELDX (1)");
So the index has to be used on both group and field. Rather odd...
I have updated so that the following works:
Also Group details are exported/imported in RecordEditor-Xml. They are exported as a Tag on the field item, but only when they change so you get
it should be one of:
but could well be
I will look at it and update to
Also with getGroupField you do not need to specify every Group level. Only specify the minimum to fully qualify the name. It tries to follow the "Cobol" convention.
Reasoning:
In Cobol adding in a Group level does not cause a problem, so people do it without thinking about it e.g.
becomes
Last edit: Bruce Martin 2015-08-14