This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - getting reverse relationships using AML

Santhosh - Tuesday, February 8, 2011 12:24 PM:

Hi Community,

I have started with innovator recently.

I have two item types "Specification" and "Drawing". Specification has one of the relationship as "Drawing".

I'm trying to get a report with reverse relationships i.e., getting Specification using drawing.

Could anyone please help me how to write AML query to get reverse relationships.

Santhosh



tigrao - Tuesday, February 8, 2011 1:34 PM:

You try this:

<AML>
<Item type="yourRelationships" action="get">

    <related_id>{IDYourSuperItemType}</related_id>
    <source_id>
        <Item type="yourItemTypeSlave" action="get" select="*">
           
    </source_id>
</Item>
</AML>



Santhosh - Wednesday, February 9, 2011 12:37 AM:

Hi,

thanks that worked.

But I'm having hard time understanding this query and how does it work.

Could you please explain how does this query.

Santhosh



tigrao - Wednesday, February 9, 2011 10:57 AM:

 <AML>
<Item type="yourRelationships" action="get">       ///     here is catching the relationship which relates the two itemType

    <related_id>{IDYourSuperItemType}</related_id>        ///    here you should inform the ID of the parent itemType
    <source_id>
        <Item type="yourItemTypeSlave" action="get" select="*">  ///    here you must inform the child itemType           
    </source_id>
</Item>
</AML>



Santhosh - Tuesday, February 15, 2011 12:17 AM:

thanks that helped a lot.