Searching multiple fields for the same keywords
K1 v1.5 saw the introduction of Boolean searches. Boolean searches allow you to construct extremely detailed and powerful searches, using a simple GUI client window. Please refer to the Online Help for more information.
One of the most powerful features of the K1 Boolean Search function is the ability to define a variable. This means that when a user replays a saved Boolean search, you can prompt them for certain values to use with your search.
This article illustrates how using the Boolean Search you search multiple fields for the same keyword.
Note: this article only applies if you are running K1 v1.5 or higher.
In this example we are going to create a Boolean search that will search the description and title fields of MetadataProfile records.
Firstly we need to create a variable. This is accomplished by clicking on the New button above the variable list. When prompted enter a name for your variable. This is the name your users will see when searching. In this example we'll use the name of "Keyword".
The next step is to select the field you wish to use, in this example we select the Description field.
You can now specify the text you wish to search for or specify that you want to find what the users enters in a variable. In this case we want to search for a variable input so we highlight our variable "Keyword" and select the Insert button located above the variable list. The query should appear as follows:
To search additional files we now select the OR option from the drop-down list (lower left hand corner, see above). If we wanted to specify that the term must appear in all fields we would use the AND option. Drop-down the list, select OR and then click on the Insert button.
We now want to search the Title fields, by default there are five title lines. The Title fields are linked fields so we need to "drill down" to the Title table. To do this, we highlight the Title1 field and click on the down arrow (located at the top of the field) list. We can then highlight the External ID field for the Title table. Now, click the Insert button above your Variable list and the query should now appear as follows:
To return to the MetadataProfile fields, click the up arrow above the field list.
Now repeat the above steps for the remaining Title fields.
Once complete, you query should appear as: (note: reformatted for readability)
You can click the Check Syntax button to confirm your Boolean search query is correct.
If your syntax is correct, click Save to create a Saved Search that users can use at any time by using the Replay Search method.
When running your Boolean search, users will see the following:
This is just one example of a Boolean search. You will find this
new feature extremely beneficial in simplifying some of the more
complex searches that you use on a regular basis.