Author Topic: Using Model Searches with the Model Views browser  (Read 1286 times)

Polymorph

  • EA User
  • **
  • Posts: 120
  • Karma: +4/-0
    • View Profile
Using Model Searches with the Model Views browser
« on: August 02, 2016, 11:26:21 pm »
I am trying to write SQL searches and use these to create Model Views. Here is an example (simple) search

Code: [Select]
Select
  t_object.Name,
  t_object.ea_guid As CLASSGUID,
  t_object.Object_Type As CLASSTYPE
From
  t_object
Where
  t_object.Name Like "System"

I have saved this search under the name "My Test Search" and it is accessible from the drop-down list of user-defined searches


This search just looks for any model elements with the term "system" in their name - obviously my actual search is WAY more complex than this...

This code returns model elements exactly as expected...



Then, I have created a Model View search



Then I hit a problem... when I try to add the search that I created previously, the list of available searches does not include my newly created search  ???



What have I done wrong? I can see other custom searches in the list

When I click on the ... button the Manage Search dialogue window opens and I can see my search (yay!)



But there doesn't seem to be any "OK" button on it and once I hit "close" then I am returned back to the previous dialogue box again and my new search is one again not listed in the available choices!

This is driving me crazy!!!!!!!!!!

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #1 on: August 03, 2016, 12:11:43 am »
I never have used that (like so many other features of EA). But the drop down does not list "My searches" (for what reason ever). The ellipsis just switches to the Manage Searches to modify them, not to choose one of them. EAUI

q.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6200
  • Karma: +47/-5
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #2 on: August 03, 2016, 08:22:22 am »
I suspect you need to replace 'As' with 'AS'. (case sensitive)

http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_navigation/model_views_operations.html

I though that our help had made this explicit, but I can't find anything about it in the more complete reference for SQL searches either. (http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_navigation/creating_filters.html)
Simon

support@sparxsystems.com

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #3 on: August 03, 2016, 08:32:39 am »
It says "Click on the drop-down arrow and select an existing search from the lists" but does not tell what the list contains. Obviously not "My searches"

q.

Polymorph

  • EA User
  • **
  • Posts: 120
  • Karma: +4/-0
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #4 on: August 03, 2016, 05:18:48 pm »
Quote
I suspect you need to replace 'As' with 'AS'. (case sensitive)

That seems to have done the trick - the search now appears!

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #5 on: August 03, 2016, 05:55:47 pm »
In my case I had defined a test search (without any AS ClassGuid). So it should be mentioned in the help at least.

This AS-bug is known since years. It must be very difficult to fix that :-X

q.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1157
  • Karma: +8/-3
  • Read The Help!
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #6 on: August 04, 2016, 10:11:14 am »
In the two topics that Simon mentioned, I have added a statement that the SELECT statement is case-sensitive and should be typed as shown. I'm not sure about qwerty's comment - we do say in several places that the statement must include AS CLASSGUID and AS CLASSTYPE.
Best Regards, Roy

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #7 on: August 04, 2016, 11:03:38 am »
In the two topics that Simon mentioned, I have added a statement that the SELECT statement is case-sensitive and should be typed as shown. I'm not sure about qwerty's comment - we do say in several places that the statement must include AS CLASSGUID and AS CLASSTYPE.
Hi Roy,

I think Q's comment is related to why it is case sensitive.  Have to admit it's not clear to me why it needs to be.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: Using Model Searches with the Model Views browser
« Reply #8 on: August 04, 2016, 06:57:18 pm »
Yes, the AS must be upper case. I seem to remember that Geert discovered that a long time ago. SQL keywords are NOT case sensitive.

q.