3 Replies Latest reply on Aug 15, 2012 2:44 AM by AndrewL

    Omitting records from view

    AndrewL

      Title

      Omitting records from view

      Post

      Hello there,

      Sorry, this is probably dead easy to anyone else here, but I cannot for the life of me figure out how to do it. Can you help?

      Here's the thing: I have a database with a script that shows all records in a particular layout, sorts them, then pauses, then returns to original layout

      Print Setup [Restore; No dialog]
      Go to Layout ["Inventory List"]
      Perform Script ["Sort by Location"]
      Enter Preview Mode [Pause]
      Go to Layout [original layout]
      Show All Records
      Enter Browse Mode

      Simple enough. Now, the database contains a field named "Damaged" - a checkbox. What I would like to achieve is this, I'd like all items that have a "checked" value in this field to be excluded from above view.

      I guess I need to perform a find function first in order to filter out the relevant records, but I am not exactly sure how. I tried a few things but no good, so far. Can anyone please tell me how to include this in the script above?

      Thanks ever so much for your help!

      Andrew

       

        • 1. Re: Omitting records from view
          schamblee

          Yes you would need to perform a find with omit records selected.  Your find would be based on the value you are setting in your check box.  I assume you are setting the value to "T" or "TRUE"

          In your script Specify Find Request

          action                                 Criteria

          Omit Records                       table::damaged:[T]

           OR IF TRUE                        table::damaged:[TRUE]

          • 2. Re: Omitting records from view
            philmodjunk

            Here's another option:

            Print Setup [Restore; No dialog]
            Go to Layout ["Inventory List"]
            Enter Find Mode [] //clear the pause check box
            Set Field [INventoryList::Damaged ; "Damaged" ] //specify the value entered into this field when it is marked "damaged"
            Set Error Capture [on]
            Perform Find []
            Perform Script ["Sort by Location"]
            Enter Preview Mode [Pause]
            Go to Layout [original layout]
            Show All Records
            Enter Browse Mode

            • 3. Re: Omitting records from view
              AndrewL

              Thank you Phil and S Chamblee, that did it!

              Smile

               

              Alex