3 Replies Latest reply on Oct 10, 2011 10:33 AM by philmodjunk

    Hiding Entry after Shipped

    sunwelding

      Title

      Hiding Entry after Shipped

      Post

      Hello,

      We currently have 1 layout called our stock and I would like to find out how I can automatically set the record to be hidden after it has shipped. 

      Thanks!

        • 1. Re: Hiding Entry after Shipped
          philmodjunk

          Hidden in what way? You have options here depending on the design of your layout and tables.

          In a portal, the relationship or a portal filter expression can filter out stock with a "shipped" status.

          Without a portal, scripts can perform Finds or Constrain found sets to filter out "shipped" records.

          If you have a button to click to change the records status to shipped, its script can change the value of such a status field and then use Omit record to omit the record from your current found set.

          • 2. Re: Hiding Entry after Shipped
            sunwelding

            Currently we have a layout and within that layout we have a "shipped" field.  When the item ships we enter the date into the field.  

            So we would like it to show only open orders.  I believe this would be the scripts option??

            • 3. Re: Hiding Entry after Shipped
              philmodjunk

              On layoutLoad can run a script like this:

              Enter Find Mode [] //clear the pause check box
              Set field [Invoices::Shipped ; "="]
              Set Error capture[on]
              Perform Find[]

              This finds all records where "shipped" is empty.

              Enter Find Mode[]
              Set field [Invoices::Shipped ; "="]
              Set Error capture[on]
              Constrain Found Set []

              On the other hand will just filter all shipped records out of the current found set so this can be triggered after leaving find mode if you want.

              Other options, including using a custom menu (requires FileMaker Advanced to set up), to control what happens when a user selects Show All or Show Omitted Only are also possibile.