Skip to main content
14-Alexandrite
October 19, 2020
Question

Use Query Builder to list all files with a prefix

  • October 19, 2020
  • 2 replies
  • 1954 views

We have several different filename prefixes and I'd like to generate reports that list all of the files with that particular prefix. For example, I want to find all WTParts and/or CAD files with a prefix of "XYZ-". 

2 replies

22-Sapphire I
October 19, 2020

Best to go straight to the database for this, but if it needs to be thru Windchill then:

- use the MASTER object (e.g. epmdocumentmaster, wtdocumentmaster rather than epmdocument, wtdocument) for better efficiency and simplicity.

Select directly: filename, Number, Name.

joe_morton
18-Opal
18-Opal
October 19, 2020

You could also do this with a regular advanced search.

Just enter in filename, for example, XYZ*

Aaronm8714-AlexandriteAuthor
14-Alexandrite
October 19, 2020

I understand that I can use the advanced search, but I want to be able to print them to a PDF using a stylesheet. I haven't used the querybuilder much so I'm not very familiar with how to get the outputs I want.

22-Sapphire I
October 19, 2020

Search only returns 2000 at a time, so if you have for example 40000 results, it's a pain. That's one advantage of the report.

 

Reports can also be output to various formats.  I don't bother with those - output to Excel, and from there do all formatting and save as PDF.

Note: You may want to output to HTML instead of PDF - some major advantages.

 

If you want to really make it good, consider setting up the report to (this is easy to do):

- run the report automatically on a schedule (e.g. every Monday 8 am)

- automatically send report (e.g. HTML) output to users who need to see the results