8 Replies Latest reply on Nov 30, 2016 7:20 AM by Unirisk

    Anomaly creating related records in portal from interface file

    Unirisk

      Product and version: (FileMaker Pro 15.02.220)

      OS and version: OS X 10.12.1/ Windows Server 2012 R2 Essentials (tested on both with FileMaker Pro and with FileMaker Server 15 only on Windows)

       

      Description

      On an interface file (i.e.: a file that works on tables from another file) you use a portal to create a related record in a table. If you create a new window on this file and try to edit the prompt row on the portal, you'll see a new record being created for each field you edit. E.g.: fields Name and Surname in the portal; you edit the Name field. As you jump to the Surname field, a new blank prompt row is created into the portal and a record with only the name field filled appears into the target table. As you edit the Surname field and jump to the next one, same thing happens. So, instead of having one record with Name and Surname filled, you obtain two records, one with only the Name field filled, and one with only the Surname.

       

      How to replicate

      Create a file with a simple table and two or three fields. Then create a new file and add the first file as external data source. Add the first file table into the relational graph. Then you have to set a relationship to create the new record through the portal. You can do it either with an auto-relation, either starting from another table, as you wish. I tested both having the same problem. To set the relation, I used a global numeric calculation set to 1 into the starting TOC, and a flag "New" (numeric) into the target TOC. Obviously check the allow record creation option under the target TOC. Then you can simply create a layout on the target table, better in list view. Add the portal based on the above relation into the heading section. Then open a new window and try to edit the fields into the portal.

      Have a look to the attached file: I have already set it up.

       

      Thank you for your attention.

       

      Kind regards.

       

      Federico Severin

      Unirisk S.r.l.

        • 1. Re: Anomaly creating related records in portal from interface file
          TSGal

          Unirisk:

           

          Thank you for your post.

           

          I am unable to replicate the issue using FileMaker Pro 15.0.2 under macOS Sierra 10.12.1.  This is what I have done:

           

          1. I opened both testautorelazione.fmp12 and testautorelaztione_int.fmp12.

          2. In testautorelzione_int.fmp12, I went to the Tabella layout.

           

          3. In New Record section, I entered "Test" into Testo1 field and pressed the tab.  The cursor moves to the Testo2 field, and a new portal now appears showing "Test".

           

          4. I enter "Test2" in the Testo2 field and press tab.  The last portal row now shows "Test" and "Test2" on the same line.  That is, the record does not change (as expected).

           

          5. I then commit the record, open a new window, and I am able to edit the values in the portal.

           

          Let me know what I am doing differently than you so I can replicate the issue.

           

          TSGal

          FileMaker, Inc.

           

          Screen Shot 2016-11-11 at 7.56.29 AM.png

          • 2. Re: Anomaly creating related records in portal from interface file
            Unirisk

            Hello TSGal.

            1. I opened both testautorelazione.fmp12 and testautorelaztione_int.fmp12.

            2. In testautorelzione_int.fmp12, I went to the Tabella layout.

             

            3. In New Record section, I entered "Test" into Testo1 field and pressed the tab. The cursor moves to the Testo2 field, and a new portal now appears showing "Test".

             

            4. I enter "Test2" in the Testo2 field and press tab. The last portal row now shows "Test" and "Test2" on the same line. That is, the record does not change (as expected).

             

            5. I then commit the record, open a new window, and I am able to edit the values in the portal.

            After point 2: open a new Window on the same layout. Then try again next steps. You should get two different lines for "Test" and "Test2" at point 4.

             

            Let me know.

             

            Federico

            • 3. Re: Anomaly creating related records in portal from interface file
              TSGal

              Unirisk:

               

              Thank you for the additional step.

               

              I am now able to replicate the issue with both FileMaker Pro 14 and FileMaker Pro 15 under macOS Sierra 10.12.1, Mac OS X 10.11.6 and Mac OS X 10.10.5.  I am unable to replicate the issue under Windows.

               

              I have sent your files along with my findings to our Development and Testing departments for review.  When I receive any feedback, I will let you know.

               

              TSGal

              FileMaker, Inc.

              • 5. Re: Anomaly creating related records in portal from interface file
                TSGal

                Unirisk:

                 

                Our Testing department is able to replicate the issue.  The information has been sent to our Development department for further review.

                 

                TSGal

                FileMaker, Inc.

                • 6. Re: Anomaly creating related records in portal from interface file
                  gcatnine

                  it seems that the problem is that the new record is not saved (so the relationship does not work)

                  this could be a possible solution:

                  in the portal in the new windows, (where you create the new record) add a OnObjectExit trigger to the first field (Testo1) associated to a script that saves the record.

                  This activate the relationship and everything works again.

                  Gianandrea

                  • 7. Re: Anomaly creating related records in portal from interface file
                    gcatnine

                    I responded to TSGal but my intention was to respond to you, Unirisk.

                    it seems that the problem is that the new record is not saved (so the relationship does not work)

                    this could be a possible solution:

                    in the portal in the new windows, (where you create the new record) add a OnObjectExit trigger to the first field (Testo1) associated to a script that saves the record.

                    This activate the relationship and everything works again.

                    Gianandrea

                    1 of 1 people found this helpful
                    • 8. Re: Anomaly creating related records in portal from interface file
                      Unirisk

                      Thank you Gianandrea, your workaround works!