3 Replies Latest reply on Dec 31, 2009 8:56 AM by philmodjunk

    Script Help

    jdhelle

      Title

      Script Help

      Post

      FMP - 10.V03 - Mac - FMPNovice

       

       

      Thisscriptthatfindsacertaintypemediumanddisplaystheoutput:

       

       

      GotoLayout ["RecordDetail" (MusicLibrary)]

      EnterFindMode []

      SetField [MusicLibrary::Medium; "EdisonStandardRecord"]

      PerformFind []

      If [Get (LastError) <> 0]

         ShowCustomDialog ]"Message"; "Therearenorecordsthatmatchthecriteria."]

      Else

          GotoLayout ["RecordDetail" (MusicLibrary)]

          SortRecords [Restore; Nodialog]

          GotoRecord/Request/Page [First]

          EnterBrowseMode []

      EndIf

       

       

      However, howdoIexclude, forinstance, "EdisonStandardRecord", "EdisonBlueAmberol", "DiamondDisc" anddisplayeverythingelse

       

      Thanks,

      Jeff 

        • 1. Re: Script Help
          philmodjunk
            

          Go to Layout ["Record Detail" (Music Library)]

          Enter Find Mode []

          Set Field [Music Library::Medium; "Edison Standard Record"]

          Omit Record

          new record/request

          Set Field [Music Library::Medium; "EdisonBlueAmberol"]

          Omit Record

          new record/request

          Set Field [Music Library::Medium; "DiamondDisc"]

          Omit Record

          Perform Find []

          If [Get (LastError) <> 0]

             Show Custom Dialog ]"Message"; "There are no records that match the criteria."]

          Else

              Go to Layout ["Record Detail" (Music Library)]

              Sort Records [Restore; No dialog]

              Go to Record/Request/Page [First]

              Enter Browse Mode []

          End If

           

          Go to layout step is harmless but redundant as you are already on that layout.

          Enter browse mode is not needed as you are already in this mode at that point.

          Omit Record in find mode is the script equivalent of clicking the Omit button when doing a manual find.

          • 2. Re: Script Help
            jdhelle
              

            When I try to add a new record, I get this message:

             

            "There are no records that match the criteria."  

             

            It appears immediately after pressing Command-N.  Again, only on the two new tabs.

             

            Thanks,

             

            Jeff 

            • 3. Re: Script Help
              philmodjunk
                

              It appears you are in find mode. "new record" morphs into "new request" and if you create a new blank "request" and then attempt to perform the find with one of these "requests" blank, you'll get that error message because You are attempting to find records without entering any valid criteria into one or more of these requests.

               

              Don't see what that has to do with any tabs.