4 Replies Latest reply on Feb 1, 2012 9:53 AM by TSGal

    IWP issue - contents of field in portal are doubled;



      IWP issue - contents of field in portal are doubled;


      FileMaker Server



      Operating system version

      Windows Server 2008

      Description of the issue

      The database has an events table with related contact table - people can be attached to an event.  Over IWP only (does not happen in client) with any browser (IE, Safari, Firefox), a layout based on the event table is loaded.  On that table is a portal with the contacts.  The portal does not allow direct addition of related records  - that is done by script.  However, the users are allowed to edit the information in two of the displayed field:

      1.  The person's Title
      2.  The person's organization name - a related field from the Org table. 

      If a user clicks in either field, then clicks the button to run the Add a Person script, the contents of both editable fields, (Title and Organization name) are doubled, with a return character inserted between the doublings.  For example, if a person's title is Technician, it becomes:


      The next time it happens, there would be four lines, then eight, etc.

      In some instances, there were hundreds, if not thousands, of iterations. 

      I rewrote the Add a Person script - the behavior is the same.  I tried committing records prior to doing anything else in the script, but it did not change the behavior.  I tried it on a different server, same behavior.  The only way I could fix it was to remove Browse access to the fields in the portal (and build a new layout to allow modifying that info(.

      Steps to reproduce the problem

      Make a portal on a layout with editable fields.

      Expected result

      Modifiable fields.

      Actual result

      Fields with duplicated data

      Exact text of any error message(s) that appear


      Configuration information

      Any current or close to current web browser
      Windows server 2008


      Remove browse access from portal fields.

        • 1. Re: IWP issue - contents of field in portal are doubled;

          It would be helpful to see your script for Add a Person. Care to post it? The issue would appear to lie with that script so if this is a bug, seeing the script identifies what script step failed to work.

          Before you post that script, have you checked it for web compatibility? A portion of the script or a sub script may not be executing due to a step that is not web compatible so this needs to be ruled out first.

          To post a script to the forum:

          1. You can upload a screen shot of your script
          2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
          3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
          4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional look to your script. (Use the HTML option and paste the text into the HTML editor.)
          • 2. Re: IWP issue - contents of field in portal are doubled;

            I have attached an image of the script - and the web compatibilty option was selected when I took the picture.  The script is fully web compatible.

            Just a note - I inherited this database, with a directive to find why the db was locking up when accessed via IWP and to fix that problem.  The problem turned out to be that the title and organization name fields were so large on some contact records that trying to access them via IWP was causing the Web Publishing Engine on the server to stop.

            The process to Add a Person to an event is as follows:

            1.  The Add a Person function is to link a person to the event, not add a person to the contact table.  So, from an event layout that shows the related contacts portal, a user clicks the Add a Person button to navigate to a layout that allows the user to enter search criteria.  

            2.  The user then enters the search criteria and clicks a button to perform the search, displaying the results in a list.

            The problem with the data being duplicated occurs when the button in step 1 is pushed.  Neither the Title field nor the related Organization field is being modified at this point, however a portal record is active with one of those two fields being the active field when the button is clicked in step 1. Both fields, however, have their contents duplicated.  As you can see from the attached image, the Contact table is not being accessed by the script at any time, so it's not likely that a script step is causing this.  Since this only happens in IWP, I cannot use Script Debugger to pinpoint exactly when this happens.  

            The original programmer was using a Contacts layout to perform the search, which was causing record locking problems.  I changed it so the layout was based upon a new table I added that had global fields.  The problem still occurred, but the record locking problem disappeared.  Further testing led to the discovery of this bug.

            In any event, the only fix was a work around - remove Browse access from the portal fields.   

            One last item - I am willing to let the FileMaker engineers have access to a hosted, non production version of the database on my Windows server for verification purposes.  

            • 3. Re: IWP issue - contents of field in portal are doubled;

              Wonder if those New WIndow steps with their (virtual window on web) might be a factor. They're the most obvious difference between IWP and regular FileMaker...

              The script shown doesn't seem to really do anything much to any tables. I spot just 3 set field steps that clear fields by assigning them to empty strings and a new Record request that would appear to create a new record in the FIN_Find table.

              Don't see how that can add a new instructor in either IWP or regular Filemaker...

              • 4. Re: IWP issue - contents of field in portal are doubled;

                Donald Clark:

                Thank you for your posts, and I apologize for the late reply.

                The virtual window should not cause an issue with doubling of data.  From your description, it sounds like you have a copy step (or setting a variable to the contents of the field), and then going to that field and pasting (which would double the contents).  Make sure you the entire contents selected before pasting.  Where the return character is coming from is unknown.

                I would like to have a clone of your file so I can step through the script steps to see how it performs in FileMaker Pro, and then with Instant Web Publishing.  Check your Inbox at the top of this page for instructions where to send the file.

                I realize two months have passed since you first reported this, so if you have found a resolution, please post here so others who encounter similar symptoms may benefit.

                FileMaker, Inc.