6 Replies Latest reply on Dec 12, 2016 2:14 PM by philmodjunk

    Selected default view in layout setup ignored by FM

    ChristianNissen

      Every now and then - I can´t se any pattern - the default view selected in layout setup for a layout is ignored. The layout setup states "default view: table view" but when I enter the layout, through FM menu, it shows the forms view??

       

      I can´t use a script command to correct the fault, nor can I use a manual correction,  as I want to use the table view to select a record, then change to forms view and on changing view, starting a script handling what I want done with the choosen record.

       

      Sometimes -but not every time - I go back to check the layout setup to se that all is as I saved it. To my great surprise, then sometimes FM has on its own changed the default view, from what I saved "table view" to the not wanted "forms view"?? What IS that??

       

      Is this a known bug among all the others.... and is there a known workaround? Happy for suggestions and if others have seen the same error?

       

      This is what I want

       

      Want.PNG

      But this is what I get when choosing layout "´Kreditfaktura" from the FM menu.

       

      GET.PNG

        • 1. Re: Selected default view in layout setup ignored by FM
          philmodjunk

          Are you the only one that has full access to the file?

           

          Any user with full access that even temporarily changes the view might do so in a way that changes the default.

           

          A script could be used to test for the current view and change it to the desired view.

           

          You might even be doing this to yourself when you:

           

          as I want to use the table view to select a record, then change to forms view and on changing view, starting a script handling what I want done with the chosen record.

          • 2. Re: Selected default view in layout setup ignored by FM
            Markus Schneider

            these settings are not 'default' settings in a way that the view-type is predefined. You can define options for some of the view-types, ie showing headers/footers in table-viewl, border-settings, etc.

             

            As Phil mentioned:

            One clicks the 'view-type' button ('view as') to select a view. On single-FM client (no server), this setting will remain until another 'view as' button is pressed. With FMS, a dialog box should appear asking if one wants to store this new view-setting (assume one has the needed access rights)

             

            You can use scripts/buttons for defining 'view as', layout triggers, etc.

            • 3. Re: Selected default view in layout setup ignored by FM
              ChristianNissen

              Yes I am the only one with a FM pro advanced installation, the others have normal licenses and no access to layoutsetups.

               

              Could You develop further on "Any user with full access that even temporarily changes the view might do so in a way that changes the default."  How do You mean, can the default be changed in any other way than through "the selected default view" of the layout setup??

               

              No I can not use a script to correct that FM puts me in the wrong view, as changing the view is the trigger used for the script to process the selected record in the table view when pressing the button to change the view to forms.

               

              Further - at least as long as the default in the setup for a layout shows default view = table view, I should have table view when entering that View.

               

               

              • 4. Re: Selected default view in layout setup ignored by FM
                philmodjunk

                How do you set the "default view"? Are you setting this in Layout Set up on the "view" tab or is this just the view you've selected by clicking the appropriate button in the tool bar?

                 

                When a user with full access privileges (Not a license issue but a privilege set issue in manage security), clicks one of those buttons in the tool bar, this makes a lasting change to what view pops up for the next user. When not hosted from a server, this just happens with no notice from FileMaker. From a hosted solution, a dialog pops up with every change in view asking if you want to make the change permanent. It's very easy to change this view even with these warnings and not realize it. Thus, selecting form view to change from table to form view could leave the layout in form view for the next time that you access this layout.

                 

                If, however, you change the view options in layout setup, that should remain fixed--but it would also prevent you from using the tool bar buttons to change the view so I have assumed that you are just going from the view you selected in the tool bar.

                 

                No I can not use a script to correct that FM puts me in the wrong view, as changing the view is the trigger used for the script to process the selected record in the table view when pressing the button to change the view to forms.

                Well yes you can. First, you can set up triggered scripts to do nothing if a global variable is set to a specific value. Thus a script can check the view and if it's wrong, it can first set that global variable to disable the triggered script, change the view and then return the global variable to it's previous value to re-enable triggers. I set up nearly all triggered scripts in my solutions to check for such a global variable so that I can programmatically disable trigger performed scripts.

                 

                Set Variable [$$TriggersOff ; Value: True ]

                Do anything that might trip a script trigger here

                Set Variable [$$TriggersOff ; Value: "" ]

                 

                In your script that is performed by a trigger:

                 

                If [$$TriggersOff ]
                   Exit Script [ ]

                End If

                Put rest of script here

                1 of 1 people found this helpful
                • 5. Re: Selected default view in layout setup ignored by FM
                  ChristianNissen

                  Thanks for Your well thought out response. I have been away for a day, so sorry for delaying the answer.

                   

                  - Yes, as seen in my question at the top shown by the included pics, I set the default view in the layout setup, view tab. Even when I have just checked that this value is still set to "table view" and then being the only one logged in with FM on the network, imm. select this layout from the toolbar, I am still presented with the "form view"?? This is what I can´t get my head around??

                   

                  However I think You taught me that this "default view" might be changed in other ways than through the layout setup. I am now on top of that and will test changing the networks users accessrights to see if that might block the "default change view" when they start in table view and using the toolbars button to change the view of the selected record to "forms". Sometimes there is a message from FM like "Do You whant to save the changes to the view?" Yes/No. Might it be here that a "Yes" changes the default view into "form". A very, very stupid feature in that case, especially if it cant be turned off, even worse  since I have reported this to the reps of FM here in Sweden, being annoyed of always being forced to make an answer evne when absolutly nothing has been changed... their answer being from FM that this was nothing to worry about and reporting it as a bug for future releases.??

                   

                  Never the less, why is the deafult view = table view ignored even when NOTHING has been done after ensuring that its the active choice in the layout setup??

                   

                  Your third block of text I dont understand? In the layout set up, view I have selected form, table and default view table as seen in the pic at the top of this thread.

                   

                  Your last block was a very fine tip! Thanks. I will see how I can use it.

                   

                  Another way around my problem could be if I understood how to put a Button (that I can attach the script that now is activated on "Change View") to a forms report. I do that a lot to a "screen form" and it works well, but however I try I cant find a way to have a "Button" whith a reportview (or a table view for that sake) any tips there? Perhaps a buttonbar?

                   

                  Again thanks a lot for Your interest in my problems.

                   

                  Regards

                  • 6. Re: Selected default view in layout setup ignored by FM
                    philmodjunk

                    By "report view" do you mean Preview Mode? No you can't click a button while in preview mode, but you can float a small floating document window that's in browse mode in front of a window in Preview mode to get clickable buttons.

                     

                    I am now on top of that and will test changing the networks users accessrights to see if that might block the "default change view" when they start in table view and using the toolbars button to change the view of the selected record to "forms". Sometimes there is a message from FM like "Do You whant to save the changes to the view?" Yes/No.

                    You really shouldn't have any "full access" users except for those that are working as developers to create/modify the design of the database. Granting this level of access to others is a recipe for serious problems as they can very easily change a layout or other part of the database and not even know that they've done so. Only full access users will get that message asking if they want to save changes to the view and the system is doing exactly that, changing the view for all users as it is basically asking the developer if the view change should be a design change. If it didn't do that, you wouldn't be able to make a permanent change to the view as a developer.

                     

                    You also only see this dialog when the solution is hosted over the network.

                     

                    I do need to apologize a bit here though. I had incorrectly recalled the contents of that "view" tab in layout setup. I knew that there was an option for limiting what views are allowed, but not that there is also a default view setting. And my tests show that it's very easy to change this setting without opening layout setup. Just clicking the form view option while I have a file open with full access options is sufficient to change the default. And a change to the default selected on that view tab doesn't seem to take effect until I close and re-open the file. That makes this default view option pretty useless as it is just to easy to countermand--at least during development. It wouldn't be such a problem once the file is put into production as long as your users don't have permission to modify layouts--which they shouldn't have anyway.

                     

                    This hasn't greatly affected my own development work as I usually limit a layout to just one view option. I will create a second layout if I want to use it for a different view.