Searching for fields that 'include' a value

You may well find yourself wanting to search for words that are included in a field, rather than being exactly equal to it. This takes us that one step further than the Simple mode of defining a Recordset, so we'll need to flick over to the Advanced mode.

Assuming that you've created your search page, we need to define a recordset on the results page. Within your results page, go to Data Bindings and click the big PLUS button to add a new Recordset (Query)

We'll start off in Simple mode and let UltraDev do most of the hard work for us. Our search form has submitted a value in the field "Item" for us, via a parameter on the URL. We want to select a recordset of records which have that value included in the Item field.

So, let's build the recordset in the usual way

As you can see, we're filtering on the field Item and getting the value of this from a URL parameter. What this does though is look for exact matches, which isn't quite what we need. We don't want it to be equal to, be want it to include.

So lets flick to Advanced mode by clicking the button on the right.

Here you can see the SQL statements which are making up our query. You'll notice that the third line in the SQL box is

WHERE Item = 'MMColParam'

'MMColParam' is basically the parameter on our URL. This is the line we need to change. Instead of '=' we need to use 'Like'

Notice I've also had to add % signs around the 'MMColParam' so now it reads '%MMColParam%'.
That whole line should now read as follows:

WHERE Item Like '%MMColParam%'

Click OK and that should be our recordset built!