3 Replies Latest reply on Oct 27, 2015 7:21 AM by eX-Christo

    [Tip-n-Trick] Hide-n-Seek a Button in a FileMaker Pro Portal Row

    eX-Christo

      Ready to Play Hide and Seek with a Button in a FileMaker Pro Portal Row?
      By Rob Poelking

       

      I just figured this out and thought it was cool enough to share with you. It’s pretty commonplace to put a button over a FileMaker Pro portal row object to trigger an event related to that particular row. But sometimes you don’t want a button across the entire row. So then we typically put a visual button off to the side like an “edit” button, but the result can be unsightly seeing “edit” repeated a dozen times on the screen. So, what if you could just display the edit button when that row was active. In FileMaker 13, you can with the new hide object feature.

      So, to set this up, I had to add a field in the related table as an unstored calculation Get ( RecordNumber ). Then, I had to name the portal object. Now using the function to GetLayoutObjectAttribute, I can dynamically show the button only with the portal row is active with this calculation:

      not ( GetLayoutObjectAttribute ( "portal" ; "hasFocus"  ) and (Get ( ActivePortalRowNumber ) = myPortal::RECORDNUMBER ) )

       

      Download the demo file and give it a whirl!

      FileMaker Pro Portal Row Button Hide and Seek

       

      This is not the only way to provide this button in a FileMaker Pro portal row functionality. After reviewing, Doug West offered up an idea by simply using a global variable to achieve the same effect.

       

      Either method provides an intuitive user interface that allows a user to select an item in a list before taking action on it. This also works well in FileMaker Go where unintentional taps don’t accidentally set off an unintended process.

       

      Happy FileMaking

       

      *This article is provided for free and as-is, use and play at your own risk – but have fun! Excelisys does not provide free support or assistance with any of the above. If you would like help or assistance, please consider retaining Excelisys’ FileMaker Pro consulting & development services.


      About Excelisys, Inc.: Founded in 2001, Excelisys (www.excelisys.com) is an FBA Platinum Partner and FileMaker Certified developer organization. Excelisys specializes in designing, developing, customizing, supporting, consulting, migrating, upgrading, fixing, and integrating of FileMaker Pro and FileMaker Go database solutions, MySQL, PHP, CodeIgnitor, PostgreSQL, QuickBooks-FileMaker Pro Integration, Excel and MS Access to FileMaker Pro conversions/migrations, iPhone and iPad business solutions, and other various database frameworks and web technologies that automate your organization’s data solution needs for use on the web, mobile, and desktop platforms. Contact Excelisys today for a free estimate and consultation about your business software automation needs @ 866-592-9235.

        • 1. Re: [Tip-n-Trick] Hide-n-Seek a Button in a FileMaker Pro Portal Row
          carlosilvia0

          It 'very interesting, especially the use of the function "GetLayoutObjectAttribute" to hide the button.

          • 2. Re: [Tip-n-Trick] Hide-n-Seek a Button in a FileMaker Pro Portal Row
            BMyers

            It drove me nuts that there wasn't a simple way to hide buttons on portal rows.

             

            Then I had an idea.  I made the buttons the same color as the portal row.  Then I made the portal row change color when I hover over it.  The button then stands out.

             

            E.g. for my use my portal rows are white when not activated in some way.  I made the buttons white, so they don't show against the white portal row.  Then I made the portal rows appear blue when the cursor is on them.  In layout mode, click on the portal row and then look at the Inspector.  Under the Appearance tab there will be a drop down at the top with the choices "Portal" and "Portal Row."  Choose Portal Row.  Then I used these settings for the various states:

             

            Primary: Transparent

            Alternate: Transparent

            Active: Blue

            Hover: Blue

            Pressed: Blue

             

            When the user runs the cursor over the portal list, each portal row turns blue and the buttons on that row turn white.  Looks cool, easy to do, no scripts, no extra fields, no variables.  All the buttons have to be the same color, but for today's "flat design" this plays into that theme.

            • 3. Re: [Tip-n-Trick] Hide-n-Seek a Button in a FileMaker Pro Portal Row
              eX-Christo

              Not a bad idea - the only flaw with this is it does't work for a touch environment ie. in FMGo.