3 Replies Latest reply on Jan 12, 2017 4:06 PM by philmodjunk

    Beginner Question / Filtering Records By Category

    scottganderson

      I'm brand new to FileMaker Pro so it could be that I'm missing something obvious. Hoping I can get some help with what seems like it should be a simple operation.  I have a table called "Work Notes" whose records have only 2 fields.  One called "Description" and one called "Category".  I created a layout which allows me to type a text description in the Description field and to choose a Category from a drop-down list.  I then created portals to only display notes from a particular category (category1, category2, category 3, etc.) through portal filtering according to category. This works well until I need to change the category of a given note. The individual category portals do not update unless I perform a "Refresh" command from the menu which is not only clunky, but I may not always remember to do it. I know I could work with a found set by manually performing a search, but I would prefer to have separate lists, broken down by category. My question is simply, is there an easier way of accomplishing what I need? Apologies if I'm not being clear and thank you in advance for any help any of you are able to provide. 

        • 1. Re: Beginner Question / Filtering Records By Category
          philmodjunk

          Try just committing records first. As a test, you can click the layout background after changing the category. If this works, you can use a script trigger and the commit records script to automate the update.

           

          That doesn't always work so there are other options.

           

          If you have FileMaker 15, try giving the portal an object name and use Refresh Portal in a script to see if that works.

           

          Then try "goosing the match field" if none of the above works. In this, you use set field to set a match field in the layout's table to itself to force any portals based on that relationship to update. But be careful. If any look ups or other auto-enter options use that relationship to look up information from a related table, they can be updated by this step as well.

          • 2. Re: Beginner Question / Filtering Records By Category
            scottganderson

            Thank you for the quick response.  Clicking on the layout background does seem to solve the problem.  Very curious.  So you would suggest a script that commits the record and which triggers when a category selection is made from the dropdown?

             

            Also, yes I am using FileMaker 15

            • 3. Re: Beginner Question / Filtering Records By Category
              philmodjunk

              Exactly,

               

              If your value list allows the user to type text directly into the field, use OnObjectSave. If it does not, use OnObjectModify.