2 Replies Latest reply on Jul 8, 2009 8:22 AM by mrvodka

    Perform Find stops script in a Loop Script

    Karnel

      Title

      Perform Find stops script in a Loop Script

      Post

      HI!  I have the following script with a loop that performs a find and and checks it against another record.  My problem is when the find does not have a match it stops the script and places the "No records match this set of find requests." and I have to physically click the continue button for the script to continue.  Is there anyway to tell it if there is not a match to ignore and go on?  Here's my script:

       

      Go to Layout ["CurrentRosterOfficePositions" (CurrentRosterOfficePositions)]

      Show All Records

      Sort Records [Restore; No dialog]

      Go to Record/Request/Page [First]

      Loop

        Set Variable  [$OrgIDLookup]; Value:CurrentRosterOfficePositions::OrgID]

        Go to Layou ["Organization_SQL" (Organization)]

        Enter Find Mode[]

        Set Field  [Organization::OrganizationID; $OrgIDLookup]

        Perform Find []

        If [Organization::Active = "1"]

          Go to Layout ["CurrentRosterOfficePositions" (CurrentRosterOfficePositions)]

          Set Field [CurrentRosterOfficePositions::OrganizationActive;"1"]

        Else

           Go to Layout ["CurrentRosterOfficePositions" (CurrentRosterOfficePositions)]

           Set Field [CurrentRosterOfficePositions::OrganizationActive;"1"]

        End If

        Go to Record/Request/Page [Next; Exit after last]

      End Loop

       

       

       

      Thanks!!!