7 Replies Latest reply on May 23, 2012 3:00 PM by dansmith65

    IWP unable to revert after triggering validation

    dansmith65

      I'm using IWP with FM12 and found that there is no way to replicate the toolbar's "Cancel" button in one specific scenario: after user submitted an invalid value into a field defined with validation.

       

      I'm hoping someone has a work-arround to this issue because I am running my solution without toolbars, and this issue ends up messing with my whole workflow.

        • 1. Re: IWP unable to revert after triggering validation
          dansmith65

          I took some more time today to narrow down this issue. It seems it only occurs when using seperation method. I made a demo video using the attached sample files...

           

          video: http://www.screencast.com/t/fNWR4i1SH

          • 2. Re: IWP unable to revert after triggering validation
            steve_ssh

            Hello Dan,

             

             

            The video and sample file are helpful.  I read your post this morning, and it took a while before I really could reproduce and then understand the point that you raise in your post.

             

             

            Observation:

             

              The methodology of how one first attempts to commit the record seems to factor into the success/failure of the subsequent revert step.

             

             

             

            For Example:

             

            If I take your sample file, and I go to the layout that "works", and I add another simple button that just commits the record, I can elicit a different result as follows:

             

             

            1) in the web browser, get to the "works" layout with the new added "commit" button

            2) click into a field to get into editing mode

            3) clear either or both fields

            4) use the new commit button that we added to the layout to attempt to save changes

            5) see validation message

            6) dismiss validation message

            7) click the "revert" button

            8) see the validation message again (i.e. just as in the fail case that you demonstrated in the video)

             

             

            If I follow the above steps with the slight change of using the toolbar "Submit" button instead of the layout commit button (just like in your video) it works as expected.

             

             

             

             

            One other note:

             

            In the failure case that I describe above, clicking the 'revert' button a second time functions properly, i.e. click it, see the validation message which shouldn't happen, click it again, and the revert happens as it should.

             

             

             

             

            As for workarounds:

             

            I'll attach a modified version of your demo file where I've added a sort of proof-of-concept for something which I think has potential as a workaround for this bug.  The actual concept is easy -- the harder part would be to get it to match the look and feel of your IWP layout.  This could be done in at least a couple of ways -- I'm not sure I'm even settled on what would be best, but, for now, just to run this by you I'm attaching the concept.

             

             

            Very best,

             

             

            -steve

            • 3. Re: IWP unable to revert after triggering validation
              dansmith65

              Thanks for the reply and the clever work-around; that's a pretty cool trick! I hadn't noticed the different behavior depending on the method of committing the record.

               

              Unfortunately, I don't know how I could incorporate that work-around into the solution I'm working on because I use a different layout to edit records, so clicking a "Cancel" button needs to perform a script to return the user to the previous layout.

              • 4. Re: IWP unable to revert after triggering validation
                dansmith65

                Another aspect of this bug I'd like to point out...

                 

                If toolbars are hidden and disabled and field validation is triggered, the record MUST be commited. The only way to get the validation message to go away is to modify field contents to satisfy it's validation settings, then even if the user clicks a button to revert the record, it will be commited.

                 

                The only work-around I've found for this is to close the browser window and wait for your session to time-out, or have your session closed from FileMaker Server admin panel. If the user logs in again before their session times out, they will be taken back to the open record they were previously editing.

                • 5. Re: IWP unable to revert after triggering validation
                  dansmith65

                  FYI: the sample file by steve works by using a web viewer to inject html into the page when rendered in IWP. It took me a bit to find the web-viewer: it's very small and the background is white. To find it, I deleted all other elements on the layout, then clicked Edit > Selected All, it should be the only element selected now.

                  • 6. Re: IWP unable to revert after triggering validation
                    steve_ssh

                    Hi Dan,

                     

                    I can see how needing to perform a layout change after the revert adds an extra level of trickiness to the problem.  I can't think of anything for that off the top of my head, but if I do, I will post again.

                     

                    Best,

                     

                    -steve

                    • 7. Re: IWP unable to revert after triggering validation
                      dansmith65

                      I just found a similar issue regarding deleting portal records...

                       

                      If you delete a portal row from IWP, the only way to revert the delete is via the Cancel button on the toolbar, a button on the layout will always commit the record, therefore delete the portal row.