Jump to content
Server Maintenance This Week. ×

"OR" Finds


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

Recommended Posts

The only problem with that is that it isn't just the year fields for which I need to do such finds. For example, my office is divided into teams. Suppose I want to search for projects completed by either Team 1 or Team 3. Then the "..." won't work.

My concern is that the typical user in my company is not filemaker savvy. I don't want them to have to navigate several requests in order to find what they are looking for. The fewer steps, the better.

Link to comment
Share on other sites

A true OR search (such as Team 1 or Team 3) requires multiple requests. However, that should be YOUR concern, not the user's. Just give the users space to enter whatever they might be searching for - then take their input and create the required requests for them by script.

Link to comment
Share on other sites

Go to ScriptMaker to setup scripts :)

1 Example:

Create a number field, call it "SearchYear1" go in to options, storage, choose "Use Global Storage", repeat for another field, calling it "SearchYear2"

Put these two fields on a new layout called search for example...

Now, you just have to make 2 or 3 scripts..

1) Go to the find layout

2) Perform The Find

3) Cancel The Find

1) Go To Find Layout

Set Variable[ $$startLayout ; Get(LayoutName) ]

Go To Layout[ Search ]

2) Perform The Find

Allow User Abort[off]

Set Error Capture[on]

Freeze Window

Enter Find Mode[]

Set Field[ YourNormalYearField ; SearchYear1 ]

Create New Record / Request

Set Field [ YourNormalYearField ; SearchYear2 ]

Perform Find[]

If[ Get(LastError) <> 0 ]

Show Custom Dialog[Error ; Your search returned no results]

Halt Script

Else

Go To Layout[ By Calculation ; $$startLayout ]

Set Field[ SearchYear1 ; "" ]

Set Field[ SearchYear2 ; "" ]

End If

3) Cancel The Find

Set Field[ SearchYear1 ; "" ]

Set Field[ SearchYear2 ; "" ]

Go To Layout[ $$startLayout ]

There's also a technique you might want to have a look at in Sample Files and Open Source solutions called Dynamic Find Requests or something like that... It's slower in larger solutions and i don't REALLY recommend implementing it, but have a look anyway.

Link to comment
Share on other sites

Much depends on how you want to design your user interface. But yes, in general they would type what they want into global fields (in Browse mode), and no, you wouldn't use copy/paste.

Here are a couple of threads that should (hopefully) get you started:

 

 

Link to comment
Share on other sites

This topic is 6345 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.