6 Replies Latest reply on Apr 12, 2011 11:19 AM by philmodjunk

    Show only certain records on a form

    simonmcp

      Title

      Show only certain records on a form

      Post

      Hi All,

      I am returning to Filemaker Pro 11 after about ten years away from Filemaker. I am trying to do a foolproof couple of forms for two users of a Membership Database to enable them to use the same database but only see certain parts of the database.

      I have managed to get a map of each member displayed next to each member.

      I want to have one layout display everything (no problem with that layout) and the other to show just the people who have not been assigned a Local Group (one of the fileds).

      I have tried to write a script but it displays the following error message:

      "The provided criteria is not valis. Enter a valid request before proceeding."

      With the following three buttons below

      Modify Find      Contimue     Cancel

      If I click on Modify Find button it just goes to find mode and displays nothing.

      The script is;

      Enter Find Mode[Pause]

      Set Field[GRS Latest Converted::Local Group[GRS latest Converted::Local Group (not equal sign) "*"

      Perform Find[]

        • 1. Re: Show only certain records on a form
          raybaudi

          Hi

          to find for an empty field you'll need the = symbol; so:

          Enter Find Mode [ ]

          Set Field [ GRS Latest Converted::Local Group ; "=" ]

          Perform Find [ ]

          • 2. Re: Show only certain records on a form
            philmodjunk

            You've entered text into the field repetition box that looks like it should not be there. I think you want this:

            Enter Find Mode [pause]
            New Record/Request
            Set Field[GRS Latest Converted::Local Group ; "*"]
            Omit Record
            Perform Find[]

            New record request while in find mode is the same as choosing new request from the requests menu. Omit Record when in find mode is the same as clicking the Omit button while in find mode so this script now uses an "omit" request to omit all records that have any data at all in the GRS Latest Converted::local Group field.

            Notes on using Set Field in a script:

            When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Click OK. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

            • 3. Re: Show only certain records on a form
              simonmcp

              Thanks raybaudi and PhilModJunk,

              Thanks for your really quick replies.

              That was exactly what I needed. I now have the right information showing when I go into the Local Group layout.

              The bad news is that I still have only those records showing when I then go to the other layout. I thought I could just write a script to show all records but can't seem to find that in the list. Am I on the right track?

              Or could I do it by putting a pasword on each layout to stop the wrong person going into the wrong layout? If so can I put the password requirement on each button?

              • 4. Re: Show only certain records on a form
                simonmcp

                Sorry guys,

                Sorted myself, found the right button.Embarassed

                • 5. Re: Show only certain records on a form
                  philmodjunk

                  If both layouts refer to the same table occurrence (Each "box" in Manage | database | relationships is called a table occurrence), then they will both have the same found set, current record and sort order. Change this on one layout and you'll see the same changes when you switch to the other layout.

                  You can open your Local Group layout in a new window and this will no longer happen.

                  You can add a second table occurrence to the same data-source table in Manage | Database | Relationships and update the layouts and fields in one of your two layouts to refer to this table occurrence and they will then have different found sets.

                  For more on table occurrences and how they affect the function of your database:  Tutorial: What are Table Occurrences?

                  • 6. Re: Show only certain records on a form
                    philmodjunk

                    You should also look into setting up Manage | Security to control record access when you want to limit which records in a table are visible/accessible to the user.

                    See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.