3 Replies Latest reply on Jan 13, 2014 9:20 AM by philmodjunk

    Field should not be empty based on the other value

    anoobs

      Title

      Field should not be empty based on the other value

      Post

           Hello,

           I am new to filemaker and having some troubles in script.

           I made a small program to record the online and offline details. Imagine if there are 2 fields called 'status' and 'date'

           The 'status' field has two list values (ONLINE, OFFLINE). If i select 'online' in that field then i want to appear the date field and that 'date' field should not be empty. Like cannot go to the next record without filling the date if status filed value is 'online'. and with the other value in status filed, the date field should appear like hidden

        • 1. Re: Field should not be empty based on the other value
          philmodjunk

               To make a date in this field a required value, but only if status = "online", go to manage | database | fields, find the definition for this date field and double click it. Set up on of these validation calculation:

               IsEmpty ( status ) or ( Status = "online" and Not IsEmpty ( self )  ) // allows status field to be empty.

               ( Status = "offline" ) or ( Status = "online" and Not IsEmpty ( self )  ) // Requires that status be either "online" or "offline".

               How best to dynamically control the visibility of this date field will depend on the version of FileMaker that you are using. If you are using FileMaker 13, there's a new "hide when" setting that can be used to hide the field when status does not equal "online".

               There are also ways to do this in older versions. If you are not using FileMaker 13, let me know and I'll share a demo file of methods for controlling visibility when using an older version of FileMaker.

          • 2. Re: Field should not be empty based on the other value
            anoobs

                 Hi...

                 Thank you very much for your answer. I am using filemaker 12 now. But if u could send a file like what u explained above(including the online offline stuffs+invisible field), then that will help me more to understand. 

                 Once again thank u very much Philmodjunk

            • 3. Re: Field should not be empty based on the other value
              philmodjunk

                   Here's the file that I was describing. I have not altered it to make any of the examples specific to this thread: https://www.dropbox.com/s/8levaz6deiyzjr8/LayoutObjectVisibilityControlDemo.fp7

                   You can use Open from FileMaker's File menu to open this file in order to get a copy converted to the .fmp12 file format.