Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Rich Anderson on November 28, 2022, 04:13:39 pm
-
In 15.2 and previous versions, I could do a wildcard search in the "Find in Project" window by putting in a '*' in the search box. That doesn't work in 16.1 as it searches for the string '*' in the elements. Hmmmm. Why different?
However using the underscore '_' DOES appear to work as wildcard. (Don't ask how I figured this out as I think I was just lucky).
I can't find any guidance on search wildcards in the Help, so if someone has insight on this, I would appreciate it.
I find this really helpful for filtering searches by stereotype so, for instance, show me all the Archimate Business Processes in my model, regardless of folder.
-
This doesn't depend on the EA version, but on the database.
Standard SQL wildcards are "%" for any number of characters, and "_" for a single character.
Only MS-Access decided to use it's own "standard" and replaced the "%" with a "*"
I'm guessing you are no longer using .eap(x), so you'll have to use "%" now.
Geert
-
In EA-searches use #WC# to represent a wild card. EA translates it to the right one.
q.
-
This doesn't depend on the EA version, but on the database.
Standard SQL wildcards are "%" for any number of characters, and "_" for a single character.
Only MS-Access decided to use it's own "standard" and replaced the "%" with a "*"
I'm guessing you are no longer using .eap(x), so you'll have to use "%" now.
Unfortunately, it's more complex than that. If you're using a 64 bit version of EA then EA is no longer using the JET driver to connect to eapx. Surprisingly the Microsoft Access Database Engine uses "%" as a wildcard. Ultimately, that changes your definition slightly. It depends on the database driver.
-
Thanks, everyone. Will use the % which seems to work. Geert, you guessed correctly that I switched database types. It seems really odd to me that this should change in the UI due to the database. Seems to me that EA's UI should specify what the wildcard is and then do the translation behind the scenes. (i.e. it should not change based on dataabase or driver which is not something a user should be expected to know)
-
Thanks, everyone. Will use the % which seems to work. Geert, you guessed correctly that I switched database types. It seems really odd to me that this should change in the UI due to the database. Seems to me that EA's UI should specify what the wildcard is and then do the translation behind the scenes. (i.e. it should not change based on dataabase or driver which is not something a user should be expected to know)
You're not.
In EA-searches use #WC# to represent a wild card. EA translates it to the right one.
q.
-
Ok, there is something I'm not getting here. What am I supposed to put in the search term if I simply want the search to return ALL elements in the model. I put in various forms of #WC# based on what I was able to read here https://sparxsystems.com/enterprise_architect_user_guide/16.1/the_application_desktop/creating_filters.html and that doesn't work. So, it looks like I need to use % when using QEA and * when I'm using EAPX.
-
Which EA version? For 15.x and below you can use #WC#. No idea for 16.x
q.
-
Which EA version? For 15.x and below you can use #WC#. No idea for 16.x
q.
Not in the search term field I think.
Geert
-
I'm just talking about the Common Searches/Simple dialog that comes up when you hit CTRL-F to find, which is the search I use 99% of the time (and I don't think I'm unusual in that respect). I just tested this again. In 15.2 and earlier versions using an EAPX file, the wildcard to get all elements is *. In 16.x, it is %. When I put #WC# in either version, it returns no results. I'm not trying to use a SQL query. My point was that for a simple search like that the wildcard should not be database dependent and I would argue that * is better because that's the most common wildcard that everyone knows. (e.g. for searching file names on Windows)
-
Dooh, yes. Never thought about that (I just know by heart which wc to use). But you are right. EA should give a possibility to enter a wc at this place. The # is only valid in constructed searches. You have to send a feature request. And don't put much hope in that :-/ And don't wonder what the outcome would be if any.
q.
-
Thanks, q! I was wondering if I was going crazy. Perhaps I am, but not about this.