Hi
I query part related data from
wt.part.WTPartUsageLink , with MODE = "NESTED"
Next cost related data from
wt.configurablelink.ConfigurableDescribeLink
I make a join based on the obid.
when the mode is nested, the data queried from the second webject does not come in the joined group.
where as when the mode = "FLAT" the join works perfect.
But the business need is such that the queried parts come in hierarchy/NESTED.
Can anyone please suggest on how to solve this issue?
Thanks in advance
Best regards
Maha
I have run into this problem often. You cannot use JOIN-GROUPS on a tree structure. The way JOIN-GROUPS works will not guarantee that the output group is in the same order as the input groups.
The way I worked around it is to do joins to trees in code:
g1=(the tree)
g2=(the other data)
create a hashmap from g2 using whatever field you are going to do the join with (obid, for instance).
iterate down g1, retrieve the join field, look up the corresponding entry in g2, then manually copy the atts you want into g1. Remember that if both g1 and g2 have X in their att set, you will likely wind up with a multivalued X, so be sure to remove X from g1 if it will really come from g2.
I have attached the source for a custom InfoEngine tag I use called JoinToTree to solve this problem. In my tasks I will use this tag to perform joins to tree structures:
<ice:joinToTree tree="PART_USAGE_LINKS" group="REQUERY" joinby="wt.part.WTPartUsageLink.obid:obid"/>
This joins the data in the REQUERY group to the tree structure in the PART_USAGE_LINKS group by matching up the wt.part.WTPartUsageLink.obid field in PART_USAGES_LINKS to the obid field in the REQUERY group.
The source won't compile without a bunch of other support code, but it will give you an idea of how to solve the problem.
Thank you Bruce, i will try doing the suggestion given and hopefully this gets resolved.
Br,Maha