11 Replies Latest reply on May 5, 2015 7:54 AM by Fred(CH)

    Unable to refresh a portal without a commit

    Fred(CH)

      Summary

      Unable to refresh a portal without a commit

      Product

      FileMaker Pro

      Version

      13.0v5 (and probably all priors)

      Description of the issue

      When you have a relationship where key on both side can change (and even if both have local storage), auto creation enabled portal-side, the portal will not always show you the NEW ADDED records until you commit the record; And the most important to me : the refresh actions are useless in this case, and lead you to break the transaction model.

      Moreover, what seem inconsistent to me is the fact that MODIFIED records are always displaying up-to-date values without need to perform any refresh action...

      Steps to reproduce the problem

      Download the attached test file and follow instructions on it.

      Expected result

      At least the the refresh window step (all boxes checked) should allow you to see the new added records without a commit record step.

      Actual result

      Actually, you must first commit, in order to see newly created related records.

      Exact text of any error message(s) that appear

      None.

      Workaround

      See above.

        • 2. Re: Unable to refresh a portal without a commit
          Fred(CH)

          Oh, i am pretty sure this is obviously a known "design limitation". Certainly for some "performance purpose"… wink

          I nevertheless posted here, because the majority of people who will run into it, will, as me, feel it as a bug or, at least, as a very unfortunate limitation.

          Fred
           

          • 3. Re: Unable to refresh a portal without a commit
            Benjamin Fehr

            Fred

            Does very seldom fail on my Yosemite 10.10.x*) system, but if, then even the script-trigger wasn't of any help.

            You might get this stable if you set the script-trigger on the input-field inside the portal for when 'leave field' instead of the 'Colors' selector.

            • 4. Re: Unable to refresh a portal without a commit
              Fred(CH)

              Thank you so much Benjamin.

              You might get this stable if you set the script-trigger on the input-field inside the portal for when 'leave field' instead of the 'Colors' selector.

              I don't think it is applicable, since the bug occurs when you change the color and not when you enter data in the portal...

              I am a bit perplexed, since it was 100% reproducible on OS X 10.8.5 and also on Windows 7, so… did you follow file's instructions ? Which are Following :

                     
              1. Choose a color and add a child record.
              2.      
              3. Change the color in order to add/see records for another color
              4.      
              5. Return to the color where you added the record : it is no more visible until you Commit. 

               

              Or maybe i missed something ?

              • 5. Re: Unable to refresh a portal without a commit
                TSGal

                Fred:

                Thank you for your post.

                Looking at your file, you have a self-join relationship, with the global text field matching the existing color.  Since the uncommitted portal record does not yet exist in the table, it will not be shown until the record is committed to the table so it can be displayed.  For example, if you have Blue assigned as the global color and enter a name of "TSGal" into the portal, and then change the global field from Blue to Red, you will see another set of related records that already exist in the table.  If you switch the global field back to Blue, "TSGal" will not be shown as the record does not yet exist in the table.  However, once you commit the record by clicking outside the portal or switching to a different record, "TSGal" will then be added to the table with the Blue color assigned.  Therefore, consider changing the script trigger to "Commit Records", as Refresh Window does not commit the data.

                TSGal
                FileMaker, Inc.

                • 6. Re: Unable to refresh a portal without a commit
                  Fred(CH)

                  Looking at your file, you have a self-join relationship, with the global text field matching the existing color. 

                   

                  Please note the same issue will occurs if the related table occurrence is not based the same table that the main occurrence table, so the "self joint" is not the matter here. I just created the more simple test file as possible just to illustrate the problem.

                  Also please note the same issue will occurs if both keys are locally stored, so the global storage is not the matter here neither.

                  For that two reasons, it is a very large scope issue.

                   

                  Therefore, consider changing the script trigger to "Commit Records", as Refresh Window does not commit the data.

                   

                  Also please note it is the workaround i initially mentioned wink

                   

                  And what do you think about my initial remark :

                  Moreover, what seem inconsistent to me is the fact that MODIFIED records are always displaying up-to-date values without need to perform any refresh action...

                   

                  Finally, i realize that my explicit purpose to let the user the ability to revert his record AND his ability to see the data he just created is not really relevant for you, (in particular the first one).

                  Too bad. But thank you for your time anyway...

                  Fred

                  • 7. Re: Unable to refresh a portal without a commit
                    Fred(CH)

                    Searching for an acceptable workaround, I also discover that Portals Filter are totally "freezed" until you commit when you add new rows, whereas if you just modify the fields of the rows, the filter is still updating the portal as expected with correct values.

                    So… definitely large scope issue...

                    • 8. Re: Unable to refresh a portal without a commit
                      Fred(CH)

                      TSGal :

                      I know i am a bit aggravating but there is one more reason to find this behavior inconsistant :

                      When you proceed the test with my file, and because i used a self-join, when you add rows in the portal you can see that the number of record on toolbar is updated, that contrevent main FMI argument that "the record does not still exist".

                      However, there is one more important thing that you can see, whenever there are two different tables or not :

                      If you open a different window based on the portal table, for instance formatted table view, and keep it on backward, Then on main layout doing the test to add rows on portal, following the process i previously provided, you do see the changes on backward window but not in the Front window where you are working; because the failure is relative to the portal object.

                      One more time, i realize that the reason of this issue is technical, "under the hood", maybe related to indexing, but not logical for the rest of us, and moreover, cause measurable negative consequences for developers.

                      You would be very kind to consider this.
                       
                      Cheers,
                      Fred
                       

                       

                       

                      • 9. Re: Unable to refresh a portal without a commit
                        TSGal

                        Fred:

                        No, you are not "aggravating".  I understand the inconsistency with the table view in another window showing the added portal record, even if it isn't yet committed.  I have created a sample file for Development and Testing and asked for a thorough explanation.  I will let you know when I receive any information.

                        TSGal
                        FileMaker, Inc.

                        • 10. Re: Unable to refresh a portal without a commit
                          TSGal

                          Fred:

                          Testing has reiterated that new portal data will not become permanent until the current record is committed, even if the other table occurrence displays the record.  This will not change.

                          TSGal
                          FileMaker, Inc.

                          • 11. Re: Unable to refresh a portal without a commit
                            Fred(CH)

                            Thanks TSGal for all your efforts.

                            You can answer them, from my part, that i appreciate their "thorough explanation".

                            Frustrating, as always...

                            Fred