10 Replies Latest reply on Feb 27, 2015 12:59 AM by User20517

    Filtered and sorted portals do not refresh properly

    User20517

      Summary

      Filtered and sorted portals do not refresh properly

      Product

      FileMaker Pro

      Version

      13.4

      Operating system version

      Mac OS X 10.10.1

      Description of the issue

      When there are 2 portals on a layout based on the same relation and one of them is filtered or sorted, adding and deleting rows in the plain portal doesn't propagate to the filtered portal until a commit occurs.

      Steps to reproduce the problem

      I have prepared a file to demonstrate this behavior.
      Please, let me know how exactly to upload the file.

        • 1. Re: Filtered and sorted portals do not refresh properly
          philmodjunk

          I suspect that this is considered expected behavior. You can definitely script the deletion of portal records to include a commit records step. Creation with a commit might be a bit trickier to script depending on the design of your layout and whether you click a button to add a new portal record or do so by entering data into the bottom "add row" of the portal.

          • 2. Re: Filtered and sorted portals do not refresh properly
            TSGal

            Jan Zelenka:

            Thank you for your post.

            This is correct.  Since the user always has the ability to Undo, the data in a portal is not updated until the record is committed.

            TSGal
            FileMaker, Inc.

            • 3. Re: Filtered and sorted portals do not refresh properly
              User20517

              Thanks for your answers.

              I have to say that this looks to me more like an inconsistent approach towards user experience. If I don't use sorting or filter, whatever I do in the first portal is immediately reflected in the other portal even if no commit occurs. While I understand that filemaker probably achieves filters and sorting by creating a separate data segment in memory and therefore has difficulties to keep all the segments synchronized, this is a serious obstacle exactly in allowing the user to undo.
              In my specific case, when a user checks on certain check-boxes on a layout, I use a script to create some related records - in a portal outside the layout boundaries. There is a visible portal based on the same table occurrence but it has to be filtered because not all users may see all the related records. Yet when they uncheck the check-box, I need to remove all the related records regardless of whether the user can see them. So I need one unfiltered portal, one filtered.
              If the only way to keep them synchronized is to commit, it's not possible for the user to undo after they change the value of the check-box.

              • 4. Re: Filtered and sorted portals do not refresh properly
                TSGal

                Jan Zelenka:

                Feel free to send in a real-life example, so our Development team can consider this option.  Check your Inbox at the top of this page for instructions where to send the file.

                TSGal
                FileMaker, Inc.

                • 5. Re: Filtered and sorted portals do not refresh properly
                  TSGal

                  Jan Zelenka:

                  File has been received, and the instructions are clear.  The file has been sent to Development and Testing for review.  When I receive any feedback, I will let you know.

                  TSGal
                  FileMaker, Inc.

                  • 6. Re: Filtered and sorted portals do not refresh properly
                    TSGal

                    Jan Zelenka:

                    Development and Testing have replied this is currently a design limitation.  Attempting to make all these cases work automatically could severely affect performance.  This is one of the reasons for the Refresh Window and Refresh Object script steps.

                    Since this is a design limitation, I recommend you enter this as a suggestion into our Feature Requests web form at:

                    http://www.filemaker.com/company/contact/feature_request.html

                    All entries into this web form populate a database file that is hosted and monitored by Product Management and Development.  All entries into this form are read, discussed and considered for possible implementation in a future release.  Although I could copy your post and paste it into the web form, there are a couple of questions asked that only you can answer.

                    TSGal
                    FileMaker, Inc.

                    • 7. Re: Filtered and sorted portals do not refresh properly
                      User20517

                      Thanks for your reply.

                      I fully understand this and I don't think we need a new feature for this - if Refresh Window worked, which it doesn't. Even after executing refresh window, the contents of the 2 portals remain the same and different from each other.

                      So, do I need to file a new bug report regarding the refresh window script step or can we keep on in this thread?

                      • 8. Re: Filtered and sorted portals do not refresh properly
                        Fred(CH)

                        Just to be sure : i assume you already check both "cache" checkboxes on Refresh Window step ?

                        • 9. Re: Filtered and sorted portals do not refresh properly
                          TSGal

                          Jan Zelenka:

                          Keep everything on this thread.  I'm still discussing this issue with Testing, and the only option at the moment is using Commit Records.

                          One option is to set up an OnObjectExit script trigger for the last field in the portal (Name) that performs:
                               Commit Records/Requests [ ]
                               Go to Portal Row [ Select ; Last ]
                               Go to Field [ <first field in portal> ]

                          In essence, this commits the record, updates the filtered portal, then goes to the last row of the portal and puts the cursor in the first empty field of the new record in the portal (for example in your sample file, ShowInFilter).

                          For the button to delete a portal row, instead of executing the step "Delete Portal Row", have the button execute a script that includes the steps:
                               Delete Portal Row [ No dialog ]
                               Commit Records/Requests [ ]

                          This deletes the portal row, and the Commit Records will update the filtered portal.

                          Let me know if you need additional clarification.

                          TSGal
                          FileMaker, Inc.

                          • 10. Re: Filtered and sorted portals do not refresh properly
                            User20517

                            Thanks for diving deeper into this. I know this all - our reason for working with a portal outside of the layout area was exactly to avoid the4 need for a commit.

                            It's a rather complicated layout with a decent number of validations at commit. The user must be able to execute scripts that modify the related data without being enforced to comply to all the validation rules before doing so.

                            Nevertheless, in this specific case we have come to an agreement with the client that allows us to bypass Filemaker's lack of refresh flexibility while providing the requested functionality to a degree that satisfies our client.

                            Thank you!