Greetings Query Builder Gurus,
Have you ever seen this?
I am able to add an attribute in the Select tab but not the Criteria.
From SELECT Editor, I select the attribute from Parent Process.Created By.Full Name from Wf Assigned Activity.
From Criteria Editor, I attempt to select the same attribute from the list. Parent Process (among others) is not even available. Can you explain this?
Thanks in advance.
It is because the attributes without a green triangle are derived attributes. This does not correspond to any database columns but are derived through java methods. Derived attributes cannot be used in a criteria for database function like order by, sort and so on.
You can read more about in WHC http://www.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=QBSelectAttributeWindowAbout&action=s... .
Then why are some basic information derived? Why is "Number" a derived value?
I have a report to show any ECR that does not have an ECN. I use Change Request (wt.change2.WTChangeRequest2) and Change Notice (wt.change2.WTChangeOrder2) but I can't add the "Number" field for the ECR to the Sort.
There are ways to get around that restriction.
For example, I recently built a set of reports for a customer that wanted to pull change requests and also the related change notices and problem reports to them. This includes the context names as well. While the context name is one of the derived attributes where you can't "criteria-ize" it, what you CAN do is use the "id" attribute within the "persist info" tree of the context location. This will get the database's ida2a2 value. With this information, we were able to make "sub-reports" of this same report to apply only to specific contexts, and since the ida2a2 field isn't required to show in the report, it makes no difference to the end user.
Just about any item that has a record in the DB has an ida2a2 value or similar ida* type value where it may be possible to apply logic similar to this, depending on your report need and some creativity.
As another option, my company has also built some reporting tools that directly pull from the DB and can utilize more complex queries, as well as put into more graphical or "pretty" appearances for detailed or high-level consumption as well. I'd be happy to send you a sample report of this variety - just send me a direct e-mail if you are interested.
at the end of the document I wrote Resource for reporting you can find an attached presentation https://www.ptcusercommunity.com/servlet/JiveServlet/download/6348-76-73173/_Reporting6.2.pptx
At page 15 it's explained what Binesh wrote.
Starting from Windchill 11.0 F000 this behavior will change (see also this discussion BIG Query builder news on Windchill 11.0)
This is a piece of the new functionality:
"The Select or Constrain tab is now used to specify all items that appear on the Report Builder criteria pane. New functionality is available to control how attributes are displayed in the Report Builder, including whether they are available for the user to specify criteria, and whether they are automatically included in the report results"
Binesh is correct on the question. However, in order to achieve what I wanted I simply had to add the right object to the From table and create the proper joins
Agreed. To create criteria on derived attributes. you need to find the actual tables which has corresponding attributes and join them appropriately.
@Marco ...That is good information. Thanks for sharing.