4 Replies Latest reply on Apr 8, 2017 9:56 AM by PeterCortiel

    conditionally hide/unhide controls

    PeterCortiel

      I have a from for a donors table which has a type field (Private or Company) and then names if type = "private" or company if type="company"

       

      The names field have a hide condition to. unhide if type = "private", the company field has the opposite

       

      When I add a new record the proper fields show up.

       

      When  step through the records the hide unhide does not work, meaning when zi go from a private to company donor the names fields remain visible and the company filed is invisible

       

      How can I refresh the hide/unhide when moving from record to record?

        • 1. Re: conditionally hide/unhide controls
          philmodjunk

          Give the control an object name

          use OnTecordLoad to perform a script with refresh object

          • 2. Re: conditionally hide/unhide controls
            William-Porter

            Peter,

             

            I can't see why you need a refresh step anywhere or anything else fancy.

             

            I think I understand what you're trying to do. You've got three fields:

            • TYPE
            • PERSONAL NAME
            • COMPANY NAME

            All three are data entry fields. If type = Company, you want to see the company name and hide the personal name, and you want to do the reverse if type = Personal.

             

            I just set this up in a new test file, added the appropriate hide specifications to the personal name and company name fields, and created some records. It works perfectly for me. No OnRecordLoad script triggers refreshing screen, nothing else fancy happening. I put it up on a server and tested there, too, and it still works fine.

             

            If you want to send me your file (or send me a private message with access to the file) I'd be happy to take a quick look at it. But this is pretty basic stuff and if I've understood correctly what you're doing, it ought to work without any extra help. My wild guess right now is that there's a slight fault in your Hide formula, but that's just a wild guess — where I'd look first myself if I did this and it didn't work initially.

             

            Will

             

            p.s. What version of FileMaker are you using?

            1 of 1 people found this helpful
            • 3. Re: conditionally hide/unhide controls
              PeterCortiel

              Thanks fro your reply.

              Interestingly, I just created a new project , added 3 fields and the same kind of hide logic and it works.

               

              But it does not in my real project.     (it's probably to big to send)

               

              Btw I am using fm15 advanced.

               

              :-(

               

              P

              • 4. Re: conditionally hide/unhide controls
                PeterCortiel

                OK Thanks again.

                I created a new form with the names and type field. Made sure the logic works and then copied over all the other controls.

                 

                Something on my original form must have been screwy

                 

                Peter