sbrown218
Posts: 2
|
Posted: 04/19/2004, 10:38 AM |
|
I have used the application builder to create search fields that reference my database table. however, i want the option to also do keyword searches against all of the fields..
The first thing I did was "insert row" on my search form and then created a field called "Keyword" with a "FORM textbox" which i called {s_KeyWord} ... this added a "Keyword" field at the bottom of my current search fields so it looks something like this:
Job Number [{s_JobNo}]
Customer [{s_Customer}]
End User [{s_EndUser}]
Address [{s_Address}]
City/State [{s_CityState}]
KeyWord [{s_KeyWord}]
After getting the {s_KeyWord} added i then went to the data properties for this search form and modified the Data Source properties, defining an SQL Query which is ---
SELECT *
FROM jst
WHERE ( Address LIKE '%{s_KeyWord}%'
OR CityState LIKE '%{s_KeyWord}%'
OR Customer LIKE '%{s_KeyWord}%'
OR EndUser LIKE '%{s_KeyWord}%'
OR JobNo LIKE '%{s_KeyWord}%' )
AND Address = '{s_Address}'
AND CityState = '{s_CityState}'
AND Customer = '{s_Customer}'
AND EndUser = '{s_EndUser}'
AND JobNo = '{s_JobNo}'
It seems to me however that I am working in two directions when I do this because I think the [Search] button is using a form which builds the SQL Query. I dont think it is using the SQL Query i have built for the {s_KeyWord} field.
How would I get the [Search] button to reference my SQL Query? Im basing what I have done off of what i found in the Code Charge Studio Documentation .. Any help would be appreciated..
Thanks
|
|
|
sbrown218
Posts: 2
|
Posted: 04/19/2004, 10:49 AM |
|
I figured out the problem.. I was doing the query in the search grid.. for some reason to me it makes sense to create your query from the area you are building your search from .. however, it doesnt take any of what i put in there and use it to search the data grid...
weird
|
|
|
|