enterprise-architect

Sorting Elements Alphabetically in Custom Template (EA 15.2)


In Enterprise Architect 15.2, I'm trying to fetch information using a custom template. I'm using different sections to navigate through connectors and extract the relevant information.

However, when I'm at the source element level, I'm unable to sort these elements alphabetically.

Here's the structure I'm using:

 

package >
    element >
       {Element.Name}
        connector >
            source >
              element >
                {Element.Name}  --> Not sorted correctly
                {Element.Notes}
              < element
            < source
        < connector
        child elements >
        < child elements
    < element
< package

I also tried using the "Order By" filters in the Document Options, but that didn’t work either.

Is it possible to sort these elements alphabetically using this template structure?


Solution

  • No, I don't think the sorting works on that level.

    You'll probably need to use an SQL fragment with a query such as

    select o.Name, o.Note as [Description-Formatted]
    from t_connector c
    inner join t_object o on o.Object_ID = c.Start_Object_ID
    where o.Object_ID = #OBJECTID#