Author Topic: How to limit Search to one package?  (Read 1875 times)

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
How to limit Search to one package?
« on: September 12, 2016, 06:18:44 pm »
It seems I can only search with a Model scope but often I want to limit a search to a particular package. How can I do that?

Thanks, Michiel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9100
  • Karma: +239/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to limit Search to one package?
« Reply #1 on: September 12, 2016, 06:26:07 pm »
See the macro #Branch#

Geert

Arquesoft

  • EA User
  • **
  • Posts: 222
  • Karma: +5/-3
  • EA Consulting and development in Spanish
    • View Profile
    • Arquesoft website
Re: How to limit Search to one package?
« Reply #2 on: September 13, 2016, 12:09:38 am »
When you edit the Search, click on the button "Search Options" (the button with a checkbox list icon) and then select "Return matching items for the selected package"

                   

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: How to limit Search to one package?
« Reply #3 on: September 03, 2018, 09:59:00 pm »
When you edit the Search, click on the button "Search Options" (the button with a checkbox list icon) and then select "Return matching items for the selected package"

But how to do this with a custom SQL search query? It seems the Search Options button is not available there....
Perhaps include the package limitation in the SQL query then, but can this be done recursively? Including all subpackages?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9100
  • Karma: +239/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to limit Search to one package?
« Reply #4 on: September 03, 2018, 10:08:41 pm »
When you edit the Search, click on the button "Search Options" (the button with a checkbox list icon) and then select "Return matching items for the selected package"
Perhaps include the package limitation in the SQL query then, but can this be done recursively? Including all subpackages?

You can use the macro #Branch# as in
where o.Package_ID in (#Branch#)

EA will replace that macro with a comma separated list of the selected package al all it's subpackages recursively.

Geert