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

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

Recommended Posts

Posted

Is there anyway to do an "OR" find without having to use "Add New Request"? For example, I would like to search for all projects completed in either 2006 or 2007 is there some command that will allow me to do so? Thanks for any suggestions...

-Rebecca

Posted

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.

Posted

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.

Posted

What I'm about to ask is more than likely going to demonstrate my ignorance. How exactly would you write that script? Would they type in what they want and then my script would use copy/paste? Thanks for all of your help.

Posted

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.

Posted

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:

 

 

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