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 - AML syntax - Access two bottom levels

Remi - Friday, July 31, 2009 6:01 AM:

Hello,

 I want to create a new report based on this :

www.aras.comhttp:/.../1119.aspx

So I understand the AML syntax based on :

<AML>
 <Item type="Part" action="get">
  <item_number>1000</item_number>
  <Relationships>
   <Item type="Part AML" action="get"/>
  </Relationships>
 </Item>
</AML>

 

But now I want to access to a relationship include in Manufacturer Part ( linked via the relation Part AML ) : so to browse two levels of relationship

Actually, In my innovator configuration a Part can have several Manufacturer Part ( via the relationship Part AML ) and a Manufacturer Part can have several supplier ( via the relationship SupplierRelation ).

So I want to access to suppliers related to a manufacturer ( which is previously related to a part ). I understand that I have to make something like  :

<AML>
 <Item type="Part" action="get">
  <item_number>1000</item_number>
  <Relationships>
   <Item type="Part AML" action="get"/>

                   <Relationships>

                                        <Item type="SupplierRelation" action="get"/>

                    </Relationships>

   </Relationships>
 </Item>
</AML>

But it not exactly that because Part AML is a relationship and does not contain the suppliers  I have to access to the relationship of Manufacturer Part. I hope that I explained clearly the situation.

 

Thanks,

Regards, Remi

 



Brian - Monday, August 3, 2009 1:50 AM:

Hi Remi,

This should retrieve the relationships you are looking for.

You will want to put your filter on the part number to be returned back on. This AML retrieves all parts.

<AML>
<Item type="Part" action="get">
<Relationships>
<Item type="Part AML" action="get">
<related_id>
<Item type="Manufacturer Part" action="get">
<Relationships>
<Item type="Manufacturer Part Vendor" action="get">
</Item>
</Relationships>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
</AML>

The easiest way to test this type of AML is to use the Nash scripting tools.

Put this into your browser

yourserver/.../nash.aspx

and login to the database you are testing from.

Put the AML you want to test into the upper box labelled "XML" and click the "Submit" button.

The returned result will display below. Click the "Show XML" button to display the results in another window in a more friendly way.

Cheers,

Brian.



Remi - Tuesday, August 4, 2009 10:58 AM:

Thanks a lot,

 It is working perfectly!

 

Regards, Remi