Single Textbox Search in SOLIDWORKS Enterprise PDM

Article by GoEngineer on Jan 18, 2016

This article demonstrates how to create a single textbox field search form that will search for a given string value within any card variable and/or file name in SOLIDWORKS PDM Professional (formerly Enterprise PDM).

Single Textbox Search SOLIDWORKS Enterprise PDM

Prerequisites

  • Standard SOLIDWORKS PDM Professional (formerly Enterprise PDM) client installation
  • Windows File View vault folder
  • Administrative level access to Vault

Thumbnail (Steps 1-4)

  1. Import Complete Search form
  2. Extract three key elements and restructure search form
  3. Add Default Values
  4. Assign permissions

Step 1: Import ‘Complete Search’ Form

Once logged in as a user with permission to edit cards (typically an admin level account) there are two ways of importing a card file:

    1. Either open the Card Editor utility from the EPDM Admin tool, select Import from the File menu and then browse to the desired *.crd file(s). More than one card can be imported simultaneously.

      Import Complete Search form EPDM

    2. Or alternatively, browse to the *.crd file and open it directly from windows (double click), this will launch the card Editor as well as import the card in one step.

      Complete Search form Enterprise PDM

The Complete Search form can be found in the EPDM Program Files directory (%\Program Files\SolidWorks Enterprise PDM\Default Cards\...) on any standard EPDM client machine. 

When importing the Complete Search form, it brings with it three card variables (Description, Revision, and Number). The vast majority of vaults already use variables named ‘Description’ and ‘Revision’, and so importing these variables again will not over-write or affect any existing variables by these names. If all three variables already existed in the vault then there is no need to take any action. The variable named ‘Number’ however is perhaps less widely used as compared to Revision or Description. If the vault does not use a variable named ‘Number’ the import process has now brought this variable along for the ride.

Complete Search Form Number Field

To remedy this, find the Number edit box on the Name and Location Tab and then either delete the box and associated label or re-associate it with a correspondingly useful search term from the existing card variable list (e.g. Part Number, PartNo, DocNumber, etc.). Once the card form is saved, go back later to the EPDM card variables list and delete the now imported but unused ‘Number’ variable.

Step 2: Extract 3 key elements and restructure search form

Once the out-of-the-box Complete Search card is imported it should look like this:

Extract three Key Elements EPDM

First, stretch out the card form (to provide more temporary working room) and drag three elements from the tab control to the background of the card: From the ‘Name and Location’ tab drag the Search in all versions checkbox, and then from the ‘History’ tab drag both the Text to find in history label and the History Text list control. Place them temporarily off the tab control onto the background of the card.

Complete Search Name and Location EPDM

Next: simply select and then delete the whole tab control from the card (as the rest of the fields are unnecessary).

Complete Search Text to Find in History

Next: drag the three reserved elements up to the top of the card and then resize and arrange as appropriate. Rename the text label to something like Search against any Variable or Filename. Finally then, Save-as the new card under a name that appropriately reflects the purpose of the new Search. The end result should look something like this:

Search Any Variable or File Name EPDM

Step 3: Add default Values

What we’re making here is essentially a preconfigured History search that searches through only variables and file names. The Complete Search is already capable of doing this, but this aspect is not well advertised or understood as such. Essentially, we’re taking a key feature of the Complete Search functionality, reconfiguring it to do one specific task, and then highlighting that functionality with a purpose-built search card. The key to making this function properly is the use of default values in order to tailor and constrain exactly what the History Text field is allowed to search against. The secret sauce here is the use of search card default values. Search defaults unlike normal data card defaults are unique in that it’s not necessary for the variables specified for default values to even be used within a control on the card form.

The next step in this exercise is to find and open the search specific Default values editor. From within the card editor, this dialogue is opened either from the Card menu at the top, or from the button labeled Default Values within the Card Properties to the right.

Add Default Values EPDM

Once the Default Values editor is open it is necessary to target 9 search variables for specific default values as follows:

Default Vault Variables

Essentially what we are setting up here is a classic History search (one of many types of searches available within the classic Complete Search form) but this search by contrast is highly focused and constrained to search in a very particular fashion. The end result is a vastly simplified yet powerful search tool. In this case, the form is defaulted to search the whole vault (where Search Folder Path = “\”) and is in addition constrained by various other parameters for limiting search of the database to matching file names and/or variable values (across all variables!). This is as close as EPDM can get to a google-like single-field search. The variables listed beginning ‘History Text’ are parameters that directly affect how the History Text input field functions, they correspond to the traditional checkbox array found on the Complete Search/History tab. This is the same as preconfiguring the checkbox array to all be off except for History Text - File/Item names, and History Text - Variable Values. The nice aspect of search defaults is that it’s not necessary for the checkboxes to actually be present on the card in order to be set with default values.

If the preference is rather to only search any variables but not file name, an easy variant of this search, is to configure the defaults as follows: turn off History Text – File/Item names variable. Or create both searches, once the initial card is built, a quick Save-as can create a second card in which to place these modifications. So create one card that searches variables and names, and another that searches only variables. Why not have your cake and eat it too?

Default Search Values for Any Variable

Step 4: Assign Permissions

Search cards like many other aspects of EPDM can only be accessed by users granted permission. While in the card editor, select the background of the card to access the overall Card Properties wherein permissions can be set either by group or individual user. As is always best practice it’s usually recommended to only set permissions at the group level and not on a per/user basis. Alternatively, once the new search is saved, permissions to use the search can be set from the administrative tool within the relevant Group or User properties dialogue.

Learn More about SOLIDWORKS PDM 

Enterprise PDM SQL Maintenance Plan: Reorganizing and Rebuilding Database Indexes

Best Practices to Avoid Losing Work in Enterprise PDM 

SOLIDWORKS Enterprise PDM SQL 2014 Installation Guide

 

About GoEngineer

GoEngineer delivers software, technology and expertise that enable companies to unlock design innovation and deliver better products faster. With more than 35 years' experience and tens of thousands of customers in high tech, medical, machine design, energy and other industries, GoEngineer provides best-in-class design solutions from SOLIDWORKS CAD, Stratasys 3D printing, Creaform & Artec 3D scanning, CAMWorks, PLM, and more

View all posts by GoEngineer