4 Replies Latest reply on Aug 28, 2014 11:58 AM by philmodjunk

    Hide Object working incorrectly in Find mode.

    user22321

      Summary

      Hide Object working incorrectly in Find mode.

      Product

      FileMaker Pro

      Version

      Filemaker 13 0v3

      Operating system version

      Windows 8.1

      Description of the issue

      Hide object does not appear to be working for "apply in find mode" when it's based on a calculation.

      Steps to reproduce the problem

      1) Create calculation field such as: "Case ( Get ( UserName ) = "Me"; 1; 0 ) and make sure it's unstored.

      2) Apply hide object as: HideField = 0

      3) Go into find mode, field has disappeared.

      Expected result

      Field should be visible for user "Me" in both browse and find mode, but not visible for user "Other" in either mode.

      Actual result

      Field is visible for user "Me" in browse but not visible in find mode.

      Field is correctly hidden for user "other" in both modes.

        • 1. Re: Hide Object working incorrectly in Find mode.
          philmodjunk

               Put HideField on your layout and enter find mode. Does it show a value or is it empty?

               Is this a stored or unstored calculation field? (It should be unstored)

               And keep in mind that user names and account names are not really the same thing...

               You do not need a calculation field for this. You can put this expression into the Hide Object When box:

               Get ( UserName ) ≠ "Me"

          • 2. Re: Hide Object working incorrectly in Find mode.
            user22321

                 Thanks for your comment.

                 When it's on the layout in find mode, it's 'hidden', which it shouldn't be. In browse mode, it gives a '1' value. It's an unstored calculation.

                 Afraid I can't use an expression, because my example was a bit simplistic. It's a field shared by a few developers, so the calculation is actually:

            Case ( Get ( UserName ) = "Me"; 1; Get ( UserName ) = "Another_Developer"; 1  ; 0 )  etc.

                 A "Get ( UserName ) ≠ "Me" or Get ( UserName ) ≠ "Another_Developer"" expression wouldn't work which is why I resorted to a calculation. 

                 Edit:

                 Uploaded an example to Google Drive if that's any help, https://docs.google.com/file/d/0B_hfskxZvzACSHIwMXlHci1hU3c/edit?pli=1 - will need to change your username to 'Me'. 

                  

            • 3. Re: Hide Object working incorrectly in Find mode.
              TSGal

                   Matt S:

                   Since a Calculation field can change value for each record, the contents of the HideField calculation field cannot be evaluated when in Find mode.  Instead, put the field calculation into the "Hide Object When..."  More specifically, use as the calculation for Hide Object When...

                      Get ( UserName ) ≠ "Me" and Get ( UserName ) ≠ "Another_Developer" and Get ( UserName ) ≠ "Another_Developer_Two"

                   This will then hide the field in Find mode for users who are not "Me", "Another_Developer", nor "Another_Developer_Two".T

                   TSGal
                   FileMaker, Inc.

              • 4. Re: Hide Object working incorrectly in Find mode.
                philmodjunk

                     I'd use:

                     Not PatternCount ( "Me|Another_Developer|Another_Developer_Two" ; Get ( AccountName )

                     or maybe:

                     IsEmpty ( FilterValues ( List ( "Me" ; "Another_Developer" ; "Another_Developer_Two" ) ; Get ( AccountName ) )