Solved

script not returning a find on partial field match

Posted on 2004-04-27
4
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

695 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