I want to perform a project name search, using a wildcarded string, starting from a specific folder. I tried using aaApi_SelectProjectsFromBranch(parentID, NULL, searchStr, NULL, NULL) but it takes over 10 minutes to perform the search. If I use aaApi_SelectProjectsByProp with the same search string and parameters the results come back within a minute, but of course there are records returned that are not under the starting folder I want. Is there some way I can speed up the search? There is no other limiting criterion besides filename.
Thanks,
Stephanie
Stephanie,
aaApi_ExecuteSimpleQueryToDocumentList will do a simple search for a document and put the results in the document list. More complex searching and buffering of results can be accomplished by the functions found in the help under Search Functions. The more complex functions require building a criteria objects and buffers for the result.
Stephanie, do you get the same performance when you model the search using the ProjectWise "Search Builder" tool ? Note that you can start the search from an arbitrary folder by right-clicking on the folder and selecting "Advanced Search", and you can select Search Builder as the default search interface from the "Tools" > "Wizard Manager" menu item.
Hi Michael,
I tried to use Search Builder but couldn't get it to accept the criteria of a foldername like '*(LAP)*'. It kept switching to "is' instead of like and then didn't come back with valid records.
Hi Dean,
I haven't used document lists before, but since I am searching for projects, not documents, would this even work? If so, can you point me to some example that uses the sub? For example, if I were to look for all projects with names containing the string (LAP) somewhere in it, and starting from a specific project to search under?
Correction. It came back with a window of folders (that didn't display the folder name or any information about them in the window) for the whole data source and if you clicked on the individual "empty" folders you could see the name and details in the properties window. I couldn't find a way to limit the search to only look for folders under a specific paren folder.