Solved

script not returning a find on partial field match

Posted on 2004-04-27
4
340 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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry, instead of -

PatternCount(Title of File = "DRAKE")

I meant to type -

PatternCount(Title of File, "DRAKE")
0
 

Author Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now