Solved

script not returning a find on partial field match

Posted on 2004-04-27
4
343 Views
Last Modified: 2010-04-27
filemaker version 6.0v4Dev on windows xp

i am trying to write a script to search the database for a certain word or words in a certain field in each record and flag a field of the record when a match is made. it is my understanding that the = sign would do this in a search statment. however, if i put in a single word "DRAKE" as the search criteria,  i get no matches. If i put in 'DRAKE FABRICS, INC." which is the complete text in the field being searched, i get a match and the flag field is set.  the following is the script:

Show All Records
Got to Record/Request/Page[First]
Loop
    If ["Title of File = "DRAKE""]
        Set Field ["Marked Selection", "1"]
    End If
    Go to Record/Request/Page[Exit after last, Next]
End Loop

no match found on above search

putting:
 If ["Title of File = "DRAKE FABRICS, INC.""]

gets me a match and the flag field is set
0
Comment
Question by:kauakea
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:michael_george
ID: 10933390
Replace

If ["Title of File = "DRAKE""]

with

If ["PatternCount(Title of File = "DRAKE")"]

Any pattern matching "Drake" will result a non zero value (TRUE) and will set "Marked Selection" to "1"

The "Marked Selection" flag will be set for "DRAKE" as well as "DRAKE FABRICS, INC."
0
 

Author Comment

by:kauakea
ID: 10933482
I get an error message:

"There are too few separators in this function"

when i try to change the if statement within the specify box to read

PatternCount(Title of File = "DRAKE")

0
 
LVL 2

Accepted Solution

by:
michael_george earned 500 total points
ID: 10933986
Sorry, instead of -

PatternCount(Title of File = "DRAKE")

I meant to type -

PatternCount(Title of File, "DRAKE")
0
 

Author Comment

by:kauakea
ID: 10934261
thanks, that worked great for me. but i am confused. isn't the = operator supposed to do the same thing???
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question