Author Topic: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)  (Read 185 times)

DarrenDickens

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
If I create an SQL query under Edit-->"Search in Model" it gets loaded into the "My Searches" list. If I run the query then I get the results in the bottom pane. I can click on any column heading to sort the results on that column heading (with an up arrow icon at the far right of the column heading), clicking again reverses the sort order (now with a down arrow). All pretty normal stuff just like in Windows Explorer, nice.

My question is "How do I turn the ordering off and revert back to the ORDER BY ordering mentioned in my SQL query"? Clicking the column heading a 3rd time does not turn that ordering off. If I close my EA project and open another one and run my query the clicked column is remembered and the up/down arrow is shown. This is getting a bit annoying since I had my SQL with a nice ORDER BY ordering that is no longer being obeyed.

Thanks
Darren

qwerty

  • EA Guru
  • *****
  • Posts: 8895
  • Karma: +134/-122
  • I'm no guru at all
    • View Profile
Re: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)
« Reply #1 on: October 12, 2017, 11:05:38 pm »
Probably you send a bug report/feature request. Happens to system where there is no style guide for GUIs.

q.

DarrenDickens

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)
« Reply #2 on: October 13, 2017, 01:39:18 am »
Bug report/feature request sent to Sparx. I'll keep this thread posted on any outcome.

DarrenDickens

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)
« Reply #3 on: October 17, 2017, 10:02:50 pm »
Sparx have confirmed this is a bug. I am using build 1214. Sparx have confirmed the bug is now logged to be fixed (implying that the bug exists in the current EA build 1351). Sparx have provided the workaround below. I have confirmed that it does work.

  • To restore the ORDER BY (part of the original SQL query) sort order add an extra field in the SELECT <fields> FROM in the SQL query, re-run the SQL query (click "Yes" to save the search), now remove the extra field, re-run the SQL query (click "Yes" to save the search - it should now be back as your original SQL query).

Note, the extra field can be anything valid, I managed to just add a ", 1" (without the quotes) to the end of <fields> before the FROM clause.

Hope this helps someone else in the future.
Darren

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)
« Reply #4 on: October 18, 2017, 04:34:24 pm »
Thanks Darren, quite a funny workaround it is :)

Geert

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6181
  • Karma: +45/-5
    • View Profile
Re: My Searches - how to reset the column ordering (ASCENDING, DESCENDING)
« Reply #5 on: October 19, 2017, 08:18:16 am »
Just thought I'd chip in on why that workaround works.

EA saves a column layout associated with each search. That includes column order, visibility, widths and sort settings. As soon as the number of columns changes that whole layout is invalidated.
Simon

support@sparxsystems.com