Hello everyone,
I have problem related to Virtual Documents generation, i tried to search in the forum but I didn't find anything useful for me.
My goal is to generate a document all the requirements objects which match with a phase. On these filtered requirements, I should also print eventual trace relationships between the current processed object and other requirements, which belong to other packages.
For this purpose, I created a SQL query which correctly filters requirements according to the phase that is passed via the Search Box, the format of the Alias and the Stereotype. I tested it in the Project Search and it works correctly.
This is the query MySearch:
select t.ea_guid AS CLASSGUID, t.Object_Type AS CLASSTYPE, t.Name from t_object t where t.Phase like '#WC#<Search Term>#WC#' and t.Alias like '4%' and t.Stereotype <> 'information'
This is the template MyTemplate:
https://pasteboard.co/GJS7I81.pngTo use this query inside the Virtual Document, I created a model document and modified the model document tags as follows:
- RFTTemplate MyTemplate
- SearchNamer MySearch
- SearchValue MyPhase (either First or Second or Third)
What I get is that all the requirements in the package are processed, not only the filtered ones. So the generated document covers all the requirements in the package and not only the ones filtered by the query.
Another way I thought to make this by using the Custom SQL Query in Template fragments. As far as I know, Custom SQL Query cannot take as input a search value. I would avoid making too many fragments or templates when they are not required, so I would prefer the first solution.
Am I doing something wrong?
Thanks,
Francesco