3 Replies Latest reply on Jan 23, 2012 2:12 PM by philmodjunk

    Making records "invisible"

    dennjon

      Title

      Making records "invisible"

      Post

      I've asked this with an earlier version of FMP, but perchance things have changed, so I'll ask again.  I have a DB for all the vans in our company fleet. When a van is sold I keep the record there for reference purposes, but I want it to be "invisible" for all intents and purposes. Sure, I can always preface searches with a script that ignores vans which are not active, but that's a pain.  Can records be made invisible?

        • 1. Re: Making records "invisible"
          philmodjunk

          You can't make them invisible short of exporting the data to a different table and then deleting the record from the current table. Recent versions that can use script triggers can automate the "hide" part of a find by constraining found sets. You can even constrain a found set from a triggered script immediately after the user's find completes so that their records set automaticallyfilters out "hidden" records.

          You can also use manage security to limit access to the hidden records. That approach autmatically drops them out of found sets when a find is performed.

          And custom menus can provide versions of Show all and Show omitted that don't reveail the hidden records...

          • 2. Re: Making records "invisible"
            dennjon

            Thanks for a very thorough explanation, Phil.  Can you direct me to more info on the "custom menu" scenario?  That sounds intriguing.

            • 3. Re: Making records "invisible"
              philmodjunk

              You must have FileMaker Advanced to create and install custom menus though any version of FileMaker can then use the custom menus once they are installed.

              Say you have number field named "hide" that is set to 1 for all hidden records and left empty for all others.

              In place of Show All Records, you could perform this script:

              Enter Find Mode[]
              Set Field [YourTable::Hide ; "="]
              Set Error Capture [on]
              Perform Find []

              Show Omitted Only takes a different script:

              Show Omitted Only
              Enter Find Mode []
              Set Field [YourTable::Hide ; "="]
              Set Error Capture [on]
              Constrain Found Set []

              In Manage | Custom Menus... you can duplicate custom menu set 1, give it a useful name and then edit the Records Menu set to perform the above scripts when the user selects Show All Records and Show Omitted Only when the select those menu options or press their corresponding keyboard shortcuts.