Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Rudi Claes on August 02, 2014, 01:08:27 am

Title: Sorted custom SQL search in a Model Document
Post by: Rudi Claes on August 02, 2014, 01:08:27 am
Hi all,

I would like to use the following custom SQL search in a Model Document:

SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name FROM t_object o WHERE stereotype = 'BR' AND Phase = '<Search Term>' ORDER BY Name

However, the sort order is respected in the output window, but not in the generated RTF document.

Any thoughts on this one?

Regards,

Rudi
Title: Re: Sorted custom SQL search in a Model Document
Post by: Eve on August 04, 2014, 09:30:36 am
I believe that the SQL is only used to determine which elements appear. The order of the elements won't be based on your query.
Title: Re: Sorted custom SQL search in a Model Document
Post by: qwerty on August 04, 2014, 09:36:15 am
I remember there was a thread with EA not handling the SORT option of a query. ICR whether it was a feature or a bug.

q.
Title: Re: Sorted custom SQL search in a Model Document
Post by: Rudi Claes on August 04, 2014, 11:21:54 pm
Hi,

The end-users would like to see the element names in alphabetic order for easy retrieval. Now, the order seems completely random. As this seems a fair question, can this requirement be realized without scripting?

Regards,

Rudi
Title: Re: Sorted custom SQL search in a Model Document
Post by: qwerty on August 05, 2014, 12:41:50 am
Well, the single columns have a sort option. Just click the Name header and you're done. Inconvenient extra click, but it could be worse.

q.
Title: Re: Sorted custom SQL search in a Model Document
Post by: Rudi Claes on August 05, 2014, 09:17:55 pm
Yes, the sort option on the Name Column of the Model Search is indeed not too much effort. But I would like to use the sorted output of the query in RTF document generation.
Title: Re: Sorted custom SQL search in a Model Document
Post by: qwerty on August 05, 2014, 09:32:00 pm
 :-[ The ability to read is a real advantage...

Send a feature request. But don't put much hope in it.

q.