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 feature to control the retrieval of the content of item properties similar to the "levels" attribute for relationships

Frank.Neumann - Friday, March 8, 2013 10:42 AM:

Besides relationships referring to items, our datamodel also contains item properties referring to items. Among other things this has the advantage to show them out-of-the box on the associated form. For the retrieval of relationships we can control the depth of resolution for them using the "levels" attribute. Unfortunately this does not work for item properties. In the example, from the item property "pc_vectorialpart" the query retrieves the type and the ID only:

      <Item type="pc_RotationalTransform3D" typeId="F1763D1D7A6D433E8E6835C97A75D2FE" id="000EE520EFA94FE88C6A9D167CFFE591">
        <config_id keyed_name="FCBA13EB1B8C42E4BDF6862E6746C0A6" type="pc_RotationalTransform3D">000EE520EFA94FE88C6A9D167CFFE591</config_id>
        <created_by_id keyed_name="Data Admin" type="User">EC0DF064F34D4C6F844CCC4283E0C825</created_by_id>
        <created_on>2013-03-07T17:04:07</created_on>
        <generation>1</generation>
        <id keyed_name="FCBA13EB1B8C42E4BDF6862E6746C0A6" type="pc_RotationalTransform3D">000EE520EFA94FE88C6A9D167CFFE591</id>
        <is_current>1</is_current>
        <is_released>0</is_released>
        <keyed_name>FCBA13EB1B8C42E4BDF6862E6746C0A6</keyed_name>
        <major_rev>A</major_rev>
        <modified_by_id keyed_name="Data Admin" type="User">EC0DF064F34D4C6F844CCC4283E0C825</modified_by_id>
        <modified_on>2013-03-07T17:04:07</modified_on>
        <new_version>0</new_version>
        <not_lockable>0</not_lockable>
        <pc_vectorialpart keyed_name="1 0 0 0 1 0 0 0 1" type="pc_Matrix3D">CEE2315D11B3471D8AAE13A09CE9AD57</pc_vectorialpart>
        <permission_id keyed_name="pc_Subcatalog" type="Permission">E1F5D19B7E7B41B8886482550F396E0F</permission_id>
        <pc_translation keyed_name="555 0 500" type="pc_Point3D">FCBA13EB1B8C42E4BDF6862E6746C0A6</pc_translation>
      </Item>

Is there any tweak to control the level of depth for the resultion of item properties?

My idea was to write a new server method extending the existing "get" action to take into account the "levels" attribute for item properties. I would appreciate, if you could suggest other options.

Regards,

Frank



gks by TSI - Thursday, March 21, 2013 3:49 AM:

have you tried "getItemRepeatConfig"? This is an aml-action which is more capable then a simple get, thought the request is more complex. you should be able to find several examples in this forum/on the net.



Eric Domke - Tuesday, April 2, 2013 9:02 PM:

You should be able to do something like the following in order to force Aras to expand out the item property.

<Item type="pc_RotationalTransform3D" action="get" id="000EE520EFA94FE88C6A9D167CFFE591">

<pc_vectorialpart><Item type="pc_Matrix3D" action="get"/></pc_vectorialpart>

</Item>

Another option would be to include a select statement and specify which columns you want at each level.  For example,

<Item type="pc_RotationalTransform3D" action="get" id="000EE520EFA94FE88C6A9D167CFFE591" select="keyed_name,pc_vectorialpart(keyed_name)" />



Frank.Neumann - Tuesday, April 16, 2013 4:32 AM:

Thank you Eric,

I used a combination of both approaches. In fact, I create large AML queries spanning the depth of my data model. That works perfectly and seems to be the most efficient approach.

 

Frank