5 Replies Latest reply on Jul 31, 2013 8:33 AM by philmodjunk

    Tab question

    BatuhanGizer

      Title

      Tab question

      Post

           Hello,

           I have a table where user enters data for 5 different type of values.  After entering ProjectID and AccountID, user chooses a type from a dropdown list as Bank, Cash, Invoice, Checks and so forth.  I have different buttons on the header section where the user can search for the specific type but in order to decrease the number of buttons, I want to have different tabs instead of buttons.  

           Is there anyway to have a script that does; (same script from one my buttons)

           Enter Find Mode[]

           Set Field[Account::Type; "Cash"]

           Perform Find[]

           Sort Records[Restore; No dialog]

           but instead, when user clicks Cash tab, the layout will show what the button does.  Another problem with what I want to achieve is the body part resizing according to the number of records. Any suggestions?

            

           Thanks!

        • 1. Re: Tab question
          philmodjunk

               In Browse mode, layout parts cannot resize. In Preview mode (or when printing/saving as PDF), this may be possible with sliding fields, but it depends on what is driving the need for the resize as to whether or not it is possible.

               How will having different tabs save you layout space over having different buttons? The row of tab labels would likely take up the same amount of space as your row of buttons.

               And if you intend to display the results as a table like list of multiple records inside the tab control, perhaps you should use portals with scroll bars in each tab panel and then you would not perform a find at all. The portals could all be filtered portals with different filter expressions.

               That said, it is possible to design a layout such that selecting a panel in a tab control performs a script. The best possible script steps that you'd use in FileMaker 12 and newer will differ from the steps you would use for FileMaker 10 or 11 as FileMaker 12 introduced new script triggers and get functions that simplify such a process.

          • 2. Re: Tab question
            BatuhanGizer

                 I will only have different tabs for different types but additionally I have buttons for search, going to reports, searching within different types etc.  Currently the user creates a new record, and the body part I have includes all the records right now.  The user navigates with buttons as to what they want to see on the layout with searching and sorting.  I am using Filemaker 11 right now for your script trigger questions.

            • 3. Re: Tab question
              philmodjunk

                   But what you have posted does not change my suggestions. Whether you have several buttons labeled with your account names or several tab control labels with the same names comes out nearly the same amount of space on your layout. And tab controls are not the optimum choice for displaying a found set of multiple records as tab controls are really designed for use in Form View. Some layouts found in starter soultions look like they are tab controls with lists of records, but these are either tab controls with portals to related records or the apparent tab labels are actually buttons designed to look like tabs and which are scripted to provide the illusion of a tab control--and this then is once again a row of buttons which you apparently do not want to use in the first place.

                   Another option is to use a drop down list of account names with a script trigger such that selecting an account name from the value list performs a find to pull up a sorted found set of those records.

              • 4. Re: Tab question
                BatuhanGizer

                Another option is to use a drop down list of account names with a script trigger such that selecting an account name from the value list performs a find to pull up a sorted found set of those records.

                      

                     I guess this is pretty much what I want in order to decrease the number of buttons. How do I setup a value list in the header section (where my buttons are) that does what you explained? 

                      

                      

                • 5. Re: Tab question
                  philmodjunk

                       I will assume that getting a list of account names in a drop down list is something you know how to set up. If not, let me know.

                       With a pop up menu of such values set to a field with global storage, the OnObjectModify trigger can be used to perform a find for records with the specified account name. With a drop down list, the OnObjectSave trigger can be used to perform the script. The pop up menu will be a touch more immediate in performing the script, but both options work.

                       Your script would enter find mode and use set field to use the value selected in the global field to set up a find request and perform a find. For examples of such scripts see this thread: Scripted Find Examples