10 Replies Latest reply on Oct 6, 2016 6:03 AM by pfroelicher

    portable button bar

    pfroelicher

      Hi,

      I have a multiple file solution (13 files, called empresas, produtos, lotes, pp (production planning), financeiro, and others with the interface file called 'menu".

       

      There is a open script in "menu"called "open generic" which is called from all files when someone clicks on a button to go somewhere.

       

      I am doing a makeover of the interface and am trying to make a portable menu button bar. I am creating this on in the file "menu" and would like it to be portable, so that I can paste it in all 13 files with no further fiddling around.

      The button to go to "companies" would be in the some file, lets say "products" and call the script open_generic, parameter "companies", and the script in "menu" would call the open script in "companies" putting the user on the right page showing all we have to show about our companies.

       

      2 questions

      When I transport this button bar to another file it loses the link to the script it should open. The button's description says "open script": unknown".

      I have to manually adjust all buttons. to execute script: from MENU/open_generico. (even though the External Source "menu" is open and available in the file I tested.

      What do I miss?

      2. Question: Since my button once pressed goes to another file to execute some script, the button bar popover stays open. Even doing a "close popover in my "open generic" script does not help, since at that moment my script is already in the "menu" file and not anymore in the file where the button got clicked.

      Deu para entender? =Got it? in português

      Thanks in advance.

      P

        • 1. Re: portable button bar
          David Moyer

          Olá,

          will you please tell us what version of FM you are using?

          • 2. Re: portable button bar
            pfroelicher

            Oiê (Olá is spanish :-) )

            I use FM15 all the newest.

            P

            • 3. Re: portable button bar
              David Moyer

              Thanks.

              (I used Google Translate for Portuguese - I just posted Oiê as a suggested edit for "Hello".)

              Is there a reason that you have so many files?  Can you possibly consolidate them into a single solution?  Or did I misunderstand?

              • 4. Re: portable button bar
                pfroelicher

                David,

                I just think it is easier to handle.

                I mean.. what does the invoice file have to do with the batch number file of production.

                I would rather not have one monolith.... It is a MRP that handles contact, invoicing, storekeeping, production for a cosméticos company. I am also afraid that if a file gets corrupted... well.. in short... It has to be many files.

                P

                • 5. Re: portable button bar
                  philmodjunk

                  When copy/pasting layout elements from one file to another, you have to first import or reproduce any elements that they reference first, before you paste.

                   

                  So if you set up a folder of scripts--each script performed by a button in the button bar, you would import that folder of scripts into each file first, then you would copy and paste the buttons.

                   

                  But note that any data references inside your scripts will not import successfully unless the same exact context, fields and table occurrences needed for the script are also reproduced in the file before you import the scripts. For a button bar of "navigation" buttons, that might not matter--much depends on how you write your scripts.

                  • 6. Re: portable button bar
                    pfroelicher

                    Hey Phil and David.

                    Thank you both for your help. I really appreciate it.

                    I just found it out myself.

                    When I edit the button bar in the "menu" flie, my central UI file, the one where it calls all the scripts for navigation and paste it into other files.... the " perform script " step does not go along.

                     

                    However.. If I finish my button bar in another file..say.. "financeiro" I can past this button bar into all other files and it correctly does perform script " xy" from file " menu" .

                    Hope one could understand my english..

                    The second part o my question however I have not figured out. My Popover menu in file xy stays open when I go from xy file to the other through my interface UI file " menu" .

                    p

                    • 7. Re: portable button bar
                      cortical

                      1. create the script in the file before pasting in the bb

                       

                       

                      2. Use a local script in the same file as the bb, to call the remote file script, rather than defining the bb to do the remote script

                       

                      bb in file B do script navMain in B

                      script nav_main:

                      close popover

                      do script nav_main in file A

                      • 8. Re: portable button bar
                        pfroelicher

                        David,

                        about the Olá..I myself am swiss and live for years is São Paulo...and as you and google pointed out "olá" is used here..the Why do I see more people using "oi".  I asked my wife and she said YOU are corrct with Olá. Then I looked it up: It seems that "oi" is actually Tupi-guarani, a language spoken by these peoples of the same name who dominated culture from the Missoes (Uruguay, remeber the movie with De Niro) up to about São Paulo, further up other tribes being dominant.. This language got spoken in São Paulo more than portugese until the turn of the 19. century and is very common in São Paulo still... so..sorry I mis- corrected you but I learned everybody saying "Oi" ...

                        p

                        • 9. Re: portable button bar
                          David Moyer

                          interesting, thanks.

                          "When in São Paulo ..."

                          • 10. Re: portable button bar
                            pfroelicher

                            Cortical,

                            thanks for the reply. A scipt in each file to close things and then take off to the UI file would surely work...but would leave me again with tons of scripts scattered all around.

                            I have by now finished my re-theming and upgrading of our internal MRP solution.All file now use the same custom theme, have the same look, the same navigation bar which calls the same script..... and sometimes the popover just stays open and users have to click outside to close... but since I am also the owner and boss thats acceptable and nobody really complains hahaha.

                            txs anyway

                            P