9 Replies Latest reply on Dec 22, 2010 9:50 AM by BrianKuhnert

    performing a search



      performing a search


      I have a field called license search. I want to be able to enter a number into the field and then hit my search button below to perform a find a see if the number I entered match either of 2 fields license1 or license 2. I think I'm just having a brain meltdown today but I know I need to create a script with a catch error to perfor the search, but it just not working. Please help



        • 1. Re: performing a search

          Hi kilbot and welcome to the forum,


          This is not to difficult to achieve, you are right and you do need a script, and the script can be triggered by a button, or if you are using FileMaker 10 you can trigger the script when the user hits the return or tab key out of the field.


          Either way you script will need to look like this:


          Set Error Capture [On] 
          Set Variable [ $SearchRequest ; TABLE::license Search ]
          Enter Find Mode [] // Deselect 'Pause' 
          Set Field [ TABLE::License1 ; $SearchRequest ]
          New Record/Request
          Set Field [ TABLE::License2 ; $SearchRequest ]
          Perform Find []  

          #// Check result and if no records found alert user.
          If [ Get ( FoundCount ) = 0 ]
          Show Custom Dialog ["Message" ; "No Records Found."]
          Enter Browse Mode []
          End If 


          I have added an extra step at the end to inform the user if no records are found.


          I hope this helps 

          • 2. Re: performing a search

            Thank you, worked great and I now see what I was doing wrong. By the way my cursor seems really large on the screen is there anyway to change this?


            I working on someone's database I didn't create

            • 3. Re: performing a search

              No worries kilbot, glad I could help.


              Not sure what you mean by "cursor seems really large on the screen" is it just in FileMaker? the cursor is more an OS thing.

              • 4. Re: performing a search

                Just file maker


                I converted a filemaker 5 file to 9 and when I click a text box the cursor is very large

                • 5. Re: performing a search

                  Nevermind they had the line spacing set at double causing the cursor to be larger



                  • 6. Re: performing a search

                    Question what if I wanted to keep a record of form letter after I printed it in a script, how could I do this so I could store it and look it up later so I didnt have to continue paper trails?




                    • 7. Re: performing a search
                         Use Save Send Records to save your form letter as a PDF file?
                      • 8. Re: performing a search

                        What exactly are you printing? If it is a layout setup like a letter, with values from the database then you could consider having a separate table and inputting the text automatically into a field and printing that, and then you have a record of waht you sent in the database.


                        If it is a layout with various fields like a form then a PDF would be the best method.

                        • 9. Re: performing a search


                          Excuse the question...I'm an entry level designer looking to make my databases work more intuitively...

                          Is there any way to adjust your script above so that the contents of a field in one layout is the search value for a related field in another layout?  I'm doing a student info database that allows me to keep track of the music they perform from one semester to another.  I have a report that groups their repertoire by type, pulling from all semesters.  The report sets up with no problems, but I can't seem to get a script that takes me from that students record to their information on the report.  If I can set up a dynamic search using the value of Student Records::Student_ID so that it will search in the record on Repertoire::Student_ID all will be well!