Solved

entering a search string in the script step "show custom dialog"

Posted on 2004-10-28
331 Views
Last Modified: 2010-04-27
i have a search function that uses the script step "show custom dialog". my database has 3 text fields and calculation field that combines the data in the three fields:
field1 = text
field2 = text
field3 = text
search_field = field 1 & field2 & field3
and i use the show custom dialog to perform a find on the search_field
my question is:
is there a way to enter a search string using this function??
example: i want to search for "this is a test". i tried entering the search string with "" around the text but the result showed all records with either 'this' or 'is' or 'a' or 'test' in them

0
Question by:kauakea
    10 Comments
     
    LVL 19

    Expert Comment

    by:billmercer
    Try inserting a  == (double equals sign) in front of the string to search for. This will tell FileMaker to search for the exact phrase instead of just the words in the phrase.
     
    When you are in find mode, there's a small drop-down menu in the Status Area with the word Symbols next to it.
    Click this and it will give you a short list of special symbols to use when searching, including wildcards, ranges, etc. You don't have to use this menu, you can just type the symbols directly, but the menu is a helpful reminder of the options that are available.
    0
     

    Author Comment

    by:kauakea
    the == doesnt work. i am executing my find by first getting the search criteria from the 'Input Fields' on the "Show Custom Dialog" script step
    0
     
    LVL 19

    Expert Comment

    by:billmercer
    When you say it doesn't work, what do you mean?  What results does it return? Does it give you an error message?

    You say you're getting the search criteria from the input fields dialog. Are these fields global?

    Regardless of how you get the search criteria into the file, you need to put it into a find request. Have you checked to see exactly what value is being provided to the find request? For example if you used AAA, BBB, and CCC for the three values, then at the point before you submit the find request, your search criteria should look like this:
    ==AAA BBB CCC


    0
     
    LVL 28

    Accepted Solution

    by:
    define search_field as:
    "==" & """" & field1 & field2 & field3 & """"
    0
     
    LVL 19

    Expert Comment

    by:billmercer
    Hmm, apparently the == DOES work... :)


    0
     
    LVL 28

    Expert Comment

    by:lesouef
    bill, == works when you type it directly, he's using a calculated field to work out the search_field from field 1 , 2 and 3; therefore he needs to concatenate == with f1 f2 f3 + quotes to find only the exact expression; if you miss quotes,  it will find separate words as well. So to find an exact expression manually:
    =="expression"
    if you use ==expression, a field containing "expression tar" can be found also.
    0
     
    LVL 19

    Expert Comment

    by:billmercer
    The original poster said that he did use quotes. My suggestion was to add the == in front of his existing search string, which I assumed already had quotes around it. My fault for not being explicit in my answer.
    I've been told before that I have a tendency to go on and on...
    0
     
    LVL 28

    Expert Comment

    by:lesouef
    That was not enough since he was using a calculated field. I have no idea if he tried yr expression manually before, in which case it would have been ok.
    Never mind, it is fixed, which is the main goal
    0
     
    LVL 19

    Expert Comment

    by:billmercer
    >Never mind, it is fixed, which is the main goal
    Of course!
    I'm not bitter... Not at all...
    (sniff) (whine)

     :)
    0
     
    LVL 28

    Expert Comment

    by:lesouef
    stop whine, have wine!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Anonabox PRO Tor & VPN Router

    PRO is the most advanced way to fortify your privacy and online anonymity by layering the Tor network with VPN services. Use both together or separately, and without needing to download software onto your devices.

    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…
    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 Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    911 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

    13 Experts available now in Live!

    Get 1:1 Help Now