cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Making joins in INfo*Engine

Maha
5-Regular Member

Making joins in INfo*Engine

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

2 REPLIES 2
BruceHulse
6-Contributor
(To: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.

Maha
5-Regular Member
(To:BruceHulse)

Thank you Bruce, i will try doing the suggestion given and hopefully this gets resolved.

Br,Maha

Top Tags