How do I find all of the property names associated with an object definition?

I am attempting to query all of the names of the properties from the User ItemType.

Essentially, with my first AML query, I am attempting to get all of the property names that are attached to the User ItemType definition. From there I will be able to dynamically populate a table with all associated property names and values for each row. Looking for the properties surround by the red square in screen shot

Below is a Dialog window that I have created, so my connection is established prior to showing this form, I set the Public Connection property on this form, and then show it.

Below is my failed attempt

Option Strict On
Option Explicit On
Option Infer Off
Imports Aras.IOM
Imports System.Text
Public Class ArasInnovatorUsers
    Public Connection As HttpServerConnection
    Private Sub ArasInnovatorUsers_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim sb1 As New StringBuilder
        Dim sb2 As New StringBuilder
        Dim dQ As String = Chr(34) ' Double Quotes
        Dim inv As New Innovator(Connection)
        Dim UserProperties As New List(Of String)
        'sb1.AppendLine(String.Format("<AML>", ""))
        'sb1.AppendLine(String.Format("    <Item action={0}get{0} type={0}ItemType{0}>", dQ))
        'sb1.AppendLine(String.Format("        <Relationships>", ""))
        'sb1.AppendLine(String.Format("            <Item action={0}get{0} type={0}Property{0} select={0}name{0}/>", dQ))
        'sb1.AppendLine(String.Format("        </Relationships>", ""))
        'sb1.AppendLine(String.Format("    </Item>", ""))
        'sb1.AppendLine(String.Format("</AML>", ""))
        sb1.AppendLine(String.Format("<AML>", ""))
        sb1.AppendLine(String.Format("<Item type={0}ItemType{0} action={0}get{0} select={0}name{0} where={0}ItemType.name = 'User'{0}>", """"))
        sb1.AppendLine(String.Format("<Relationships>", ""))
        sb1.AppendLine(String.Format("<Item type={0}Property{0} action={0}get{0} select={0}*{0}/>", """"))
        sb1.AppendLine(String.Format("</Relationships>", ""))
        sb1.AppendLine(String.Format("</Item>", ""))
        sb1.AppendLine(String.Format("</AML>", ""))

        Dim AML1 As String = sb1.ToString
        Dim item1 As Item = inv.applyAML(AML1)
        MsgBox(item1.getItemCount)
        For i As Integer = 0 To item1.getItemCount - 1
            Dim user As Item = item1.getItemByIndex(i)
            Dim propName As String = user.getProperty("name")
            UserProperties.Add(propName)
            MsgBox(propName)
        Next
        sb2.AppendLine(String.Format("<AML>", ""))
        sb2.AppendLine(String.Format("    <Item type={0}User{0} action={0}get{0} select={0}*{0}>", dQ))
        sb2.AppendLine(String.Format("        <Relationships>", ""))
        sb2.AppendLine(String.Format("            <Item type={0}Value{0} select={0}value,label{0}/>", dQ))
        sb2.AppendLine(String.Format("        </Relationships>", ""))
        sb2.AppendLine(String.Format("    </Item>", ""))
        sb2.AppendLine(String.Format("</AML>", ""))
        ListView1.Columns.Clear()
        ListView1.Items.Clear()
        Dim AML2 As String = sb2.ToString
        Dim item2 As Item = inv.applyAML(AML2)
        For i As Integer = 0 To item2.getItemCount - 1
            Dim user As Item = item2.getItemByIndex(i)
            '   MsgBox(user.getProperty("login_name"))
        Next
    End Sub
End Class

Parents Reply Children
No Data