Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: michielper on September 12, 2016, 06:18:44 pm

Title: How to limit Search to one package?
Post by: michielper 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
Title: Re: How to limit Search to one package?
Post by: Geert Bellekens on September 12, 2016, 06:26:07 pm
See the macro #Branch#

Geert
Title: Re: How to limit Search to one package?
Post by: Arquesoft 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"
Title: Re: How to limit Search to one package?
Post by: michielper 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?
Title: Re: How to limit Search to one package?
Post by: Geert Bellekens 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