Book a Demo

Author Topic: Filtering by package  (Read 2879 times)

Zdenek

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Filtering by package
« on: September 05, 2014, 06:45:45 pm »
Hello,
I would like to create Search in EA which will return for example all Requirements (matching some additional conditions which I am able to specify) but only from specific package.

I know about possibility in Search options which allows me to change searched scope to selected package but I would like to use my Search in Model Views so I need the condition (for example "all elements from package X including sub packages") to be built-in the Search.

Thanks,
Zdenek

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Filtering by package
« Reply #1 on: September 05, 2014, 07:32:10 pm »
Create a search like the following with the SQL Builder
Code: [Select]
SELECT o.ea_guid as classguid, o.name  from t_object as o, t_package as p where p.package_id = #Package# and o.package_id = p.package_id and o.object_type = 'Requirement'
Change #Package# to #Branch# to get the full tree parsed.

That should give you a start.

q.
« Last Edit: September 05, 2014, 07:34:22 pm by qwerty »

Zdenek

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Filtering by package
« Reply #2 on: September 05, 2014, 08:42:42 pm »
Thanks for answer.

I hoped, that it is not needed to switch to SQL because the rest of conditions can be easily build using filters and this possibility is lost when using SQL syntax :(