2 Replies Latest reply on Mar 10, 2011 12:17 PM by dansan500

    Auto Remove Empty Records - (daily Cleanup)

    dansan500

      Title

      Auto Remove Empty Records - (daily Cleanup)

      Post

      I'm looking for a Script that will look at fields in a table and remove the record,  if they are empty.

      Table: Labor_Productivity

      Field 1: Hotel ID#

      Field 2: Hotel name

      I would like the script to look at these fields in this table and remove all records that have been saved with these fields Blank.

        • 1. Re: Auto Remove Empty Records - (daily Cleanup)
          philmodjunk

          Go To Layout [labor_Productivity]
          Enter Find Mode[]
          Set Field [LaborProductivity::Hotel ID# ; "="]
          Set Field [LaborProductivity::Hotel name ; "="]
          Set Error Capture [on]
          Perform Find []
          Delete All Records [no dialog]

          This will find and delete all records in this table only where both fields are blank. If you want to delete all records where either record is blank:

          Go To Layout [labor_Productivity]
          Enter Find Mode[]
          Set Field [LaborProductivity::Hotel ID# ; "="]
          New Record/Request
          Set Field [LaborProductivity::Hotel name ; "="]
          Set Error Capture [on]
          Perform Find []
          Delete All Records [no dialog]

          With FileMaker Server, you can set up a schedule to run this once a day late at night.

          • 2. Re: Auto Remove Empty Records - (daily Cleanup)
            dansan500

            Great.... Thanks