Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Scripted Find Question


phosphor

Recommended Posts

First let me say that due to the fact that I have only been using Filmaker for about two weeks now, I would would like to say thanks, as any and all help would be apprceited. I'm developing a movie database for myself and I set up a global search box that searches all fields etc...based on a loop through a layout. Anyway it works, but I'd like to transform it to be toggled between and & or . Now I'm having trouble figuring out the or part. I was thinking I could set a global field to getwordcount, and then when the or is called having each iteration of a loop subtract 1 from this global value, while at the same time using the leftword function being passed this global to determine the seach terms. So I sort of have 3 questions would this work?

For subtracting the value of one from the global value could I just use setfield and have the calcultion be -1 ?

How do I show all the results from all the searches ?

Do I use extend? This is where I'm pretty confused. Again thank you in advance fo any and all help you may be able to contribute.

Link to comment
Share on other sites

version six and up, you can use "expand found set" for or and "constrain found set" for and searches. these are options in the perform find script step.

 

i'm not sure what you are trying to achieve with the global, but the syntax would be

 

set field[YourGlobal, YourGlobal-1]

 

 

kjoe

Link to comment
Share on other sites

Try as I might I can't get this to work. I guess cause I don't really understand how find works in filemaker. It works for the search, ie each term in the earch field is searched through properly, but only the results of the last word search are displayed. Any help would greatly be appreciated. Here's the script being used.

 

* Set Error Capture [ On ]

* Set Field [ Main::Global_SearchWordCount; WordCount ( Main::Global_SearchField ) ]

* Set Field [ Main::Global_SearchTitle; Main::Global_SearchField ]

* Loop

* Exit Loop If [ Main::Global_SearchWordCount = 0 ]

* Enter Find Mode [ ]

* Set Field [ Main::Global_SearchWord_Split; MiddleWords ( Main::Global_SearchField ;Main::Global_SearchWordCount ; 1 ) ]

* Set Field [ Main::Global_SearchWordCount; Main::Global_SearchWordCount-1 ]

* Perform Script [ "Generate Requests" ]

* Perform Find [ ]

* End Loop

* Extend Found Set [ ]

* Sort Records [ Specified Sort Order: Main::Title; ascending ] [ Restore; No dialog ]

* Set Field [ Main::Global_SearchField; "" ]

Link to comment
Share on other sites

Hi,

 

I don't have v7 at my disposal so not all steps look familiar to me, but it seems to me that the expand found set step should be inside the loop, and I believe that you don't need to run both expand set and perform find.

 

kjoe

Link to comment
Share on other sites

Thank you for replying once again, I'll definately try that, but I was wondering if maybe it could be that the commit records/requests is called in the other script ? Thanks once again, I appreciate the help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use