Book a Demo

Author Topic: Search node by GUID  (Read 12176 times)

Hardy

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Search node by GUID
« on: April 25, 2015, 03:29:20 am »
If I know the GUID of the node, can I locate it in my model quickly?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Search node by GUID
« Reply #1 on: April 25, 2015, 04:07:05 am »
Write a SQL search
Code: [Select]
SELECT  ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name FROM t_object
where ea_guid = '<Search Term>'

q.
« Last Edit: April 25, 2015, 04:07:33 am by qwerty »

Hardy

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Search node by GUID
« Reply #2 on: April 25, 2015, 04:32:24 am »
I used that query in search builder with my GUID (with or without {}), and I clicked run button. But nothing really happened.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Search node by GUID
« Reply #3 on: April 25, 2015, 05:44:56 am »
For me it worked. You need the guid with curly brackets. Did you create the search so it's in the drop down? It will not work in the SQL tab of the search builder but only the Search Builder tab itself!



q.
« Last Edit: April 25, 2015, 05:46:42 am by qwerty »

Hardy

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Search node by GUID
« Reply #4 on: April 25, 2015, 06:10:44 am »
See mine


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Search node by GUID
« Reply #5 on: April 25, 2015, 09:09:46 am »
I once found that when you copy/paste a SQL into the builder it does not work. Delete the word SELECT, type it manually and retry. That might fix it.

2nd thought. with "node" you mean an element, not a package?

q.
« Last Edit: April 25, 2015, 09:10:58 am by qwerty »

Hardy

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Search node by GUID
« Reply #6 on: April 28, 2015, 12:22:01 am »
No luck. If I remove the where condition I can get all nodes back.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search node by GUID
« Reply #7 on: April 28, 2015, 02:17:45 am »
Two possible reasons:

1) the GUID you are searching for is one of a diagram, operation, element, ... anything but an element
To check this you can use the EA Navigator. There's button that selects anything with the copied GUID (also for non-element things)
2) you have an extra space somewhere before or after the GUID
To check this you can add wildcard to the where clause
Code: [Select]
where ea_guid like '#WC#<Search Term>#WC#'
Geert

Hardy

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Search node by GUID
« Reply #8 on: May 02, 2015, 01:13:43 am »
The GUID is a sequence diagram. I used your EA Navigator I could locate it properly but the built-in search feature failed.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Search node by GUID
« Reply #9 on: May 02, 2015, 02:01:00 am »
Then instead of t_object  you must search in t_diagram.

q.