Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7634 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I'm trying to build a layout made only for search to simplify the live of my users.

Here is the deal with my database ??? It's a project database to keep track of job across our department. A job can have many different part A, B or C. The person of submit the job and the one who execute the job can change from part to part and the activity summary also.

I would like to create an interface (layout) where the user will only need to fill one field to search, for example, the activity summary in each part. I need to do this so my user do not have to fill up to 3 or 4 field with the same information when the are search record.

How can I achieved this?

Thank you.

Posted

A general technique for this is to create a global text field, call it g_Search, that is used for user input. The downside is that instead of hitting the enter button, the user will need to activate a script to perform the search, a "go" button to click next to the input field, for instance. The script then activated will build a series of find requests that will set the contents of the fields needed to be searched to the global, one after the other. If you want to search FieldA, FieldB and FieldC, for example, your script might look like:

Freeze Window

Enter Find Mode (**Restore option OFF**)

Set Field (FieldA, g_Search)

New Record/Request

Set Field (FieldB, g_Search)

New Record/Request

Set Field (FieldC, g_Search)

New Record/Request

Set Error Capture [On]

Perform Find (**Restore option OFF**)

If [status(CurrentFoundCount) > 0]

Set Field (g_Search, "")

Go to where the user should go when successful

Else

Show Message [buttons: "OK", "", ""; Data: "There are no records matching your search criteria"]

Show All Records

Set Field (g_Search, "")

End If

There are other ways to do the job, such as making a behind-the-scenes concatenation field, call it AllSearch, where the calculation is FieldA & FieldB & FieldC, then have the script execute one find request:

Set Field (AllSearch, g_Search)

I prefer the first way, as it is easier for me to add or subtract fields to be searched by modifying the script than it is to modify the concatenation calculation (which causes my database to update for fifteen minutes!)

Where you might run into trouble is your need to search "the activity summary." If this is just what you call a basic field, calculation or otherwise, then it will work. However, if you are referring to actual summary fields, then we have a problem. These fields change contents depending on a found set. I don't think it is even possible to run a find on a summary field.

Steve Brown

This topic is 7634 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.