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 - Query for the Items...

Nishant Kapoor - Monday, July 2, 2012 7:10 AM:

Hi,

I have created an import utility for the aras innovator using vb.net.

The function of this utility goes like this: Login to the utility using aras credentials and select the XML file you want to import. Next is the Attribute Mapping....in this I have one combo box followed by two listbox in the form. The first list box populates the node names from the imported XML file & in the second list box I have hard coded few item types(Part & Document) attributes name like itemnumber, partname, description etc....Items are seleted from the combo box.

I want to know how to populate all the item in combo box & say if we select Part from the item, then in the list box, all the attributes under Part Item should be displayed.

Pls suggest the possible solution..

Regards

Nishant Kapoor



gks by TSI - Monday, July 2, 2012 8:15 AM:

Every Itemtype has several relationships "Properties".
This can be used to find all the properties of an item.



Nishant Kapoor - Monday, July 2, 2012 9:16 AM:

I am able to see the properties in every Itemtype, but what I'm aksing is is there any API available for getting all the Itemtypes & their attribute in my application & if you can demonstrate via an example of vb code, it'll be very much appreciated.

Nishant Kapoor 



aponceot - Monday, July 2, 2012 9:29 AM:

Hi,

Aras Data model is self-descriptive, in order to get a list of every Item Type in the system and their properties, you just have to query it with AML : 

 

<AML>

  <Item type="ItemType" action="get" select="name,label">

  <is_relationship>0</is_relationship>

    <Relationships>

      <Item type="Property" action="get" select="name,label"></Item>

    </Relationships>

  </Item>

</AML>

 



Yoann Maingon - Monday, July 2, 2012 3:08 PM:

you'll find some vb.net code containing the AML anthony just wrote in the following project http://prodeos.codeplex.com/SourceControl/changeset/view/48811

look for the ArastoUML source folder.



Nishant Kapoor - Wednesday, July 4, 2012 9:06 AM:

Thanks!! it works!