1 2 Previous Next 18 Replies Latest reply on Mar 11, 2010 6:43 AM by mrvodka

    List view changes to Form view; all of a sudden

    Polarpro

      Title

      List view changes to Form view; all of a sudden

      Post

      <!--   StartFragment   -->

      Hi everyone,

       

      In a lot of my layouts I use a script triggered search-as-you-type feature together with list view: The head of the layout contains a field where the user enters a search string, and below there is a list showing all matching records.

       

      For a few days now it has happened that the list view jumps to form view, and I cannot figure out the reason. It only happens when I open a record from the list in (full) form view in a new window. After going back to the search field and entering a new character (in other words: making the search script run) the jump takes place.

       

      Using the script debugger I found out that the jump happens right after a Commit Record step. I use a few of them in my search script.

       

      Sure, I can add a ViewAs [View as List] script step; but honestly, I’d rather would like to know why this all of a sudden happens. I haven't changed anything in my search scripts. And it happens now in all of them.

       

      Any ideas?

       

      Thank you,

      Mike

      <!--   EndFragment   -->

        • 1. Re: List view changes to Form view; all of a sudden
          mrvodka
             PErhaps you have a OnRecordCommit trigger as well? Its hard to say without knowing more. However, I would check your layout triggers.
          • 2. Re: List view changes to Form view; all of a sudden
            Polarpro
              

            Hey mr_vodka, Thanks for your suggestion.

             

            Just checked it, but there is no OnRecordCommit trigger attached to the layout...

             

            It is really strange: I've done a fair bit of programming, but haven't changed the relevant scripts nor the layouts.

             

            The first window holds the found set in list view. Clicking on one of the records opens a second window in form view. Doing another search in the first window sets this window then to form view, too, with no additional script running.

             

            Even worse: On an other layout it happens as well while I open a record from the list: To be exact, when the script step "View as Form" is being performed, the view changes in both the first window (the one with the list of records) and in the second window to view form.

            • 3. Re: List view changes to Form view; all of a sudden
              mrvodka
                 Perhaps you can post your script or better yet your file somewhere?
              • 4. Re: List view changes to Form view; all of a sudden
                Polarpro
                   <!--             StartFragment             -->

                Hey mr_vodka,

                 

                I found something interesting out..., and fixed the problem..., but don't have a real explanation for it.

                 

                As mentioned, when having a window open with a found set in list view, it happened quite often that, when opening a record in a new window in form view, the window with the found set also changed to form view. I found out that this only happened when the first record that I opened was the first record of my found set in list view (so to speak the "active" record). When the first record that I opened was not the first one of the list, but the second, third, fourth,... one, everything was o.k.

                 

                So, it seemed to me that Filemaker, when running my Open record in form view script, made a difference between the first "active" record and the other ones.

                 

                The switch from list view to form view in both windows took place when the View as Form step was being performed.

                 

                I then had a closer glance on my Open record in form view script, which is here:

                 

                If [ Table1::Category <>"External Link" ]

                     New Window [Height: 862; Width: 871; Top: 45; Left: 70 ]

                Else

                     New Window [ Name: "ExternalLink"; Height: 718; Width: 1030; Top: 45; Left:70 ]

                End If

                #

                //  Go to Layout [ “ARA_Ext_Result_FullView”(Table1) ]

                #

                Enter Browse Mode

                View As [View as Form]

                #

                If [ Table1::Category<> "External Link" ]

                     Perform Script [ “_Tab Settings forNonEXT” ]

                Else

                     Perform Script [ “_Tab Settings for EXT”]

                End If

                 

                 

                I realized that the Go to Layout script step in the middle was deactivated. I did this a few days ago as I noticed that this step was still there from when I created this script; now however, the subscripts that you see at the bottom of the script make sure that the right layout and the right tabs appear, so the Go to Layout step was not necessary anymore. (Mea maxima culpa: I *did* change the script.)

                 

                However: Activating this step caused that everything worked the way as intended!  (Yee-ha!)

                 

                So, to me it seems that the View as step does not work just on the active window, but rather on the "active layout".

                 

                However, this does not completely explain the whole issue. As mentioned, with another layout that uses the same script the view change first took place when a Commit record step ran. Activating the Go to Layout step fixed this problem, too.

                 

                So, the issues are fixed; but I wonder if there is a better explanation for what actually has happened...

                 

                Thank you for taking thetime to read this...

                 

                Mike

                <!--             EndFragment             -->
                • 5. Re: List view changes to Form view; all of a sudden
                  mrvodka
                    

                  It hard to trouble shoot without seeing the file, but perhaps your subscript calls focus to the other window? Or perhaps your are affected by this?

                   

                  http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=7041

                  • 6. Re: List view changes to Form view; all of a sudden
                    Polarpro
                      

                    Hi,

                     

                    Thank you for your input. I've tried to isolate the problem this evening and the problem seems to be a basic or simple one... It doesn't have anything to do with subscripts or script triggers.

                     

                    Instead of placing the whole solution somewhere I created a new, much smaller file that contains only the bits and pieces that are necessary to see what's going on. I have a "Search" script and an "Open record in new window and form view" script. In the latter script there is a Go to Layout step; deactivating this one causes trouble when picking the first record in the list, as you will easily see.

                     

                    The question is just where to place the file, as here I cannot find a way too upload it... In case you're interested, let me know what's most convenient for you.

                     

                    Mike 

                    • 7. Re: List view changes to Form view; all of a sudden
                      Polarpro
                        

                      Hey mr_vodka,

                       

                      I just received a message from a FileMaker official in Germany. He says that if more than one window with the same layout is open, the view mode changes for all of these windows.

                       

                      Before changing the view mode it helps to go to another layout.

                       

                      Mike 

                      • 8. Re: List view changes to Form view; all of a sudden
                        mrvodka
                          

                        Indeed, it seems as though changing the view is layout specific, and not window specific.

                         

                        I had never come across this uhmmm "feature" as I always use dedicated seperate layouts for list and form views.

                        • 9. Re: List view changes to Form view; all of a sudden
                          mrvodka
                             The more that I think about this, the more that I think its a bug or if it isnt then it should be. This doesnt only happen when its scripted. It also happens when you just change the view type from the menu. How do you tell people to go to another layout as the rep suggested before they change the view, then go back to the original layout? That makes no sense.
                          • 10. Re: List view changes to Form view; all of a sudden
                            Polarpro
                              

                            I had never come across this uhmmm "feature" as I always use dedicated seperate layouts for list and form views.


                            So do I. I only realized this problem after introducing subscripts. My aim was to put the View as Form step in the "main" script, and the different Go to Layout steps in the subscripts. So, I had the view change before changing the layout - and found myself rather puzzled.
                             

                            The more that I think about this, the more that I think its a bug or if it isnt then it should be.

                            I think they already consider this as a bug. The rep started his message with "Currently, when you open a new window with the same layout..." The word currently indicates in my eyes that (they hope) this is a temporary thing... 
                            And yes, he mentions, too, that you don't need to script this "feature".  Just changing the view has the same result.
                            :smileyhappy:  Michael 

                            (In case you speak German:
                            http://forum-de.filemaker.com/fmide/board/message?board.id=Hello&thread.id=5567 ) 

                             


                            • 11. Re: List view changes to Form view; all of a sudden
                              mrvodka
                                 As far as I can tell, it has been there since at least version 8.5. I havent tested it on 7 and 8 yet.
                              • 12. Re: List view changes to Form view; all of a sudden
                                Polarpro
                                   That's a fair while for a "temporary" problem  ;-)
                                • 13. Re: List view changes to Form view; all of a sudden
                                  TSGal

                                  All:

                                   

                                  I don't know if this behavior is intended.  I don't see any case related to this issue, so I have created a new issue and sent it to our Development and Software Quality Assurance (Testing) departments for review.  I will keep you posted.

                                   

                                  TSGal

                                  FileMaker, Inc. 

                                  • 14. Re: List view changes to Form view; all of a sudden
                                    TSGal

                                    All:

                                     

                                    The case has been categorized as a "design change".  Therefore, it is intended behavior in FileMaker Pro 10.  No other information is available, but I will try to find out why it is intended behavior.

                                     

                                    TSGal

                                    FileMaker, Inc. 

                                    1 2 Previous Next