Forum Discussion

Aaba's avatar
Aaba
Ideator III
7 years ago

Get all property of item type and their data type

Hi Guys, I am trying to get the list of all properties in the Aras Item and their Data Type like String, boolean, Integer, date E.g. Part Item type is having property as item_number and it's data type is "String". Is there any way to get these datatypes in aras or any AML script for this? Thanks.

11 Replies

  • Their is Report available that maybe helpful for you: 1. Go to TOC and select ItemType 2. Choose your ItemType 3. Go to Reports -> ItemType Definition Report
  • Why aren't all properties listed e.g. for Part-ItemType in ItemType Definition Report? Only a small property selection is listed in the report.

    • christopher_gillis's avatar
      christopher_gillis
      Community Manager

      Hi Stephan,

      There are a number of properties that are automatically created for every ItemType. That report in particular doesn't display these system properties if no changes have been made to them. These properties include things like id, config_id, created_by_id, state, etc

      Chris

      • Stephan_Arndt's avatar
        Stephan_Arndt
        Ideator I

        Christopher, thank you for your explanation.
        It surprises me because created_on and created_by_id (both system properties) are displayed in ItemType Definition Report for "CAD" but not in ItemType Definition Report for "Part"The number of properties shown is significantly different.
        No changes were made to any properties.

  • Hello,

    Angela's suggestion of using the ItemType Definition Report is probably the best approach since it filters out all of the system properties that are automatically created. However if you need all of the properties on the ItemType, then you can use a query like the one below.

    <AML>
    <Item type="ItemType" action="get" select="name" where="ItemType.name = 'Part'">
    <Relationships>
    <Item type="Property" action="get" select="name,data_type"/>
    </Relationships>
    </Item>
    </AML>

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

    • Nilesh's avatar
      Nilesh
      Creator I

      Hi  Christopher Gill,

      Thanks for AML. Can I get  Item Type Property by using Rest Api?, If yes  please give one example.

      Thanks,

      Nilesh

      • christopher_gillis's avatar
        christopher_gillis
        Community Manager

        Hi Nilesh,

        Yes, you can use the REST API to get this information just the same as you can with AML. I'd recommend checking out this blog post which covers a few examples of how to get item data using the REST API. In particular, I'd recommend checking out the Get relationships / related items section. 

        Chris

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for addressing this topic. I was looking for the information regarding the same upsers