10 Replies Latest reply on Dec 28, 2016 9:52 AM by jormond

    how to change all layouts in one go?

    makerbert

      In my role as a developer I frequently use a copy of a production database for development purposes. I often have both databases open simultaneously when copying scripts, layout parts et cetera between them.

       

      I would like to change appearance of the headers or bodies of all 50+ layouts to display a - for example- greenish background color to have a visual reminder which database is development, which is test and which is production. All I can find is how to do this one layout at the time.

       

      I'm sure there must be a better way, can you point me in the right direction?

       

      And for everyone reading this: Have a Great 2017!

       

      Bert

        • 1. Re: how to change all layouts in one go?
          user28358

          I have the same question too. Hope to here from other FM developers too. I want to have a dynamic menu so i don't have to update all my 20 something pages when i want to add just one menu.

           

          Regards

          • 2. Re: how to change all layouts in one go?
            Markus Schneider

            Create an own theme for production and testing that differ only in headers - switching between those themes might help. You could also use one of the default themes - but that will change appearance in general

            1 of 1 people found this helpful
            • 3. Re: how to change all layouts in one go?
              user28358

              As for me i want to add an object in a menu. and because its a dynamic menu it will show up on all the pages. Is there a way to do that.

              • 4. Re: how to change all layouts in one go?
                siplus

                why change the appearance of all headers when you can add a global field to them, having the same height of the header, being large let's say 1/4 of the header and with a conditional formatting on it that evaluates "self" in several conditions and changes Fill color (and maybe text color too) reflecting the value that you can set in the opening script ?

                 

                And while you're at it, foresee a situation when you want to hide that element and glue to it a "hide when" as well.

                1 of 1 people found this helpful
                • 5. Re: how to change all layouts in one go?
                  golife

                  Well, why not expand the idea.

                   

                  In my humble opinion, also stated in the Product Ideas section with such requests, it would be ideal if there were a programmatical way of changing layouts and layout objects and their properties. Size, position, background colors, etc. Doing this using a script could save us thousands, if not hundreds of thousands of hours of doing repetitive stupid work changing the layout objects and layout style in dozens of even hundreds of layouts.

                   

                  If it can be done manually, it can also be done via script and through a loop going from layout to layout.

                   

                  All attributes such as size, position, style, etc. are known to the system already, and we users or developers are already changing them. But manually. Using a theme is fine. But it is not complete. And possibly I want to use different themes or change themes.

                   

                  It should also be possible to set up template layouts with main objects (such as headers with a menu bar for example) which could be used as the basis to change dependent layouts accordingly.

                   

                  Well, I can not think of anything that should not be possible to do if it can be done manually.

                   

                  How many times I wanted to change the overall style of a layout and had to do it manually for each layout. And then, it still might not be the ideal solution. Developers and customers change their mind. So, do it all again? Tedious and unproductive work. If all that could be under the control of scripts - it would just be fantastic and fill this huge gap.

                   

                  It is easy for the users: Set property B of object C to whatever value it would expect. Or Get property Z of object Y. The whole user interface could be programmed and built using scripts.

                   

                  I am just wondering why it was not implemented years ago.

                  1 of 1 people found this helpful
                  • 6. Re: how to change all layouts in one go?
                    siplus

                    golife wrote:

                     

                    Well, why not expand the idea.

                     

                     

                    It is easy for the users: Set property B of object C to whatever value it would expect. Or Get property Z of object Y. The whole user interface could be programmed and built using scripts.

                     

                    I am just wondering why it was not implemented years ago.

                     

                    Maybe because WYSIWYG does count ?

                     

                    Immagine NOT having the opportunity of interactively fine-tuning your layouts and having ONLY scripts as the sole resource to change a layout.

                    • 7. Re: how to change all layouts in one go?
                      golife

                      Thank you for your comment siplus ).

                       

                      Let me answer: WYSYWIG is not affected. People can do what they want as they are doing it now. But once a layout is defined, it could then be taken to a script.

                       

                      Of course, it would also be good if there were objects which can be shared between layouts. It should just be an additional property: Share certain objects between a list of layouts. Layouts then could be grouped for sharing. All these technologies are known for many years.

                       

                      My dream FileMaker would be fully scriptable. That would solve tons of problems discussed here on this forum. Imagine scripts which update the user interface whenever needed. Imagine anything that you could do. In the end, this is what programming is for, or not?

                       

                      No compromise on WYSYWIG. Even make it better.

                       

                      Ideally, even without the user noticing, in a networked environment, a new version would appear to the user just downloading a script and executing it. Different versions could appear. Then the developer would be in command within the possibilities Filemaker offers. Solutions could be shared and distributed just using scripts. Data could come from servers or JSON/XML files, or be downloaded from FTP servers.

                       

                      No more copy-paste of objects to dozens of layouts, or changing the position and size of objects. And if there was another change, the whole procedure must be redone. Noooooooo. Please...

                       

                      Filemaker basically tries to be a smarter developer tool. I am convinced through experience that it is not an end user solution. It promises an easier life for the developer to develop something more quickly. But in the end, when solutions start to become complex, far too much time is wasted fighting the limitations of Filemaker. Then, even with a steeper learning curve, other developer tools would have been right to be used in the first place, since they pay off when a complex system matures. I doubt that in the end, development time is really saved. And development will always be limited and confined to the boundaries of FileMaker. But such understanding will dawn too late. The ease of work pays off only for the first quarter of a real solution development. I know that others will oppose to this point of view.

                       

                      To really make substantial changes to a highly developed Filemaker solution is just a terrible thing. Often, it is better to start again from scratch. Any time saved? No. You must know everything about Filemaker and best practices before you should even start any professional solution. That takes a significant amount of time, even months, maybe years.

                       

                      Nevertheless, scriptable Filemaker would save us not from all, but many nightmares.

                      1 of 1 people found this helpful
                      • 8. Re: how to change all layouts in one go?
                        makerbert

                        Thanks for that, this led me to a workable solution (how can I upload a demo to share it with you all?) using a global variable (dev, tst, acc or prd) which gets set during startup and a textfield on every layout showing the {{accountname}}. That textfield gets a conditional background color based on the global var but only when the accountname is 'admin'

                         

                        In other words, normal users see their accountname at the upper left of every layout normally (they are used to that) but the admin has his accountname on a green background in development, yellow in testing, orange on acceptance and red in the production environment.

                         

                        I'm sure this can be perfected but for the moment I have a visual  reminder of where I am on each screen which will prevent me -one day- from deleting some production data without realising it.

                        • 9. Re: how to change all layouts in one go?
                          makerbert

                          Just uploaded the demofile under a topic named DTAP_colors

                          • 10. Re: how to change all layouts in one go?
                            jormond

                            I don't see why you think you need to know everything about FileMaker to start any "professional solution". I assume you are referring to developers making apps for customers. ...and that is not the primary target audience of FM. Most people are citizen developers. They build a solution that helps them do their job better, or run their small business.

                             

                            Secondly, the line about it taking a significant amount of time....well, yeah. That is true of any programming environment, isn't it. The learning curve in FM is still relatively low compared to other environments.

                             

                            I wouldn't mind seeing some scriptable layout/object actions... But I can really only think of a handful of times I would ever use it. Would be curious to hear your list.

                            golife wrote:

                             

                            You must know everything about Filemaker and best practices before you should even start any professional solution. That takes a significant amount of time, even months, maybe years.

                             

                            Nevertheless, scriptable Filemaker would save us not from all, but many nightmares.