2 Replies Latest reply on Sep 22, 2010 4:32 PM by mattb

    How to deal with this error message?



      How to deal with this error message?


      This record cannot be modified in this window because it is already being modified in a different window.

      I have 2 layouts, both associated with the same table, although each layout has input boxes for a different subset of fields.  If the user calls up one layout, starts entering material in an input box, then calls up the other layout on top without closing the first layout, the first keystroke into the first input box yields this message.  

      I've tried various things including issuing "Commit records", "Flush Cache" and even "Set Error Capture On", but nothing seems to remove this error message.  

      I do notice that if I move the cursor out of the input box on the first screen (by clicking on the background area), then call up the 2nd layout on top of the first one that this error does not occur, but the program is definitely not happy if the cursor is left in a field before switching layouts.

      I cannot believe that FMP won't allow editing of 2 different fields on 2 different layouts where the fields come from the same table (it's a 1-record table by the way).  This seems like a severe limitation to me.  There has to be a way around this without forcing the user to close the first layout before opening the second one.

      Enlighten me, please!

      Matt Bloomfield

        • 1. Re: How to deal with this error message?

          If you use commit record to commit the record on the first layout before the script opens the second window, I wouldn't expect you to get this error message. (Clicking the layout background has the same effect as the script step commit record.)

          • 2. Re: How to deal with this error message?

            Phil -

            You are entirely correct about this (and I was on the right track - I already had a "Commit Records" in the code).  It turns out that the problem I was really facing was one of window focus.  I neglected to mention I'm using another layout comprised solely of buttons to do my layout navigation. Each button on this "navigation layout" (which is always visible on the left side of the screen) brings up a different layout to the right.  So what was happening is that the moment I clicked on the navigation layout to bring up the 2nd layout, the focus was brought to the navigation layout before the "Commit Records" command was invoked.  Then the 2nd layout comes up but the records on the first layout never got "committed", hence the error message.  I've devised bit of awkward code that when a button on the navigation layout is clicked now that it issues a "Select window" command for the 1st layout and commits the records before bringing up the 2nd layout, at which point everything is fine and there is no more error message.  Took me all day to figure this out - c'est la vie...

            Matt Bloomfield