1 2 3 Previous Next 35 Replies Latest reply on May 9, 2017 7:00 AM by TSGal

    Message "Field1 is defined to require value"--but "not empty" NOT checked?

    wendy

      Hello everyone. We have a mystery: we're getting the warning "Field1" is defined to require a value, but it is not available on this layout. Use another layout to assign a value to this field" ... but Field1 (not the real name) doesn't have "not empty" validation set. What we do have:

       

      - A multi-file database now in Filemaker 13 with Filemaker 13 server on a Mac with OSX. Both upgraded over the years from Filemaker 5 or earlier. The original administrator is no longer here.

      - Field1 is defined in FileB as:

          - Text

          - Validated by calculation, value = zero, and a note by the administrator reads:

                /* Set up a validation that will always be false, in order to have a warning occur any time the field is edited.  */

                     ("Validate only if field has been modified" is checked on the Specify Calculation" window.)

                A custom message: "WARNING: You are changing this checkbox for the entire brand!"

                "Allow user to override during data entry" is checked.

           - There are no Auto-Enter settings.

      - Field1 is on a layout in File B, and formatted as a checkbox set with values from a value list in FileB. Here it works as expected. When any box (of four) is changed (checked or unchecked), the expected "WARNING: ..." message pops up, with expected options of Revert, No and Yes.

      - Field1 is also on a layout in FileA (via a relationship between two other fields in FileA and FileB). Again, it's a checkbox set with values from the same value list in FileB.

      - But in FileA, when one of the checkboxes is changed, instead of the custom warning, we get: "'Field1' is defined to require a value, but it is not available on this layout. Use another layout to assign a value to this field." Choices are "Revert Record" or "OK". If we click on revert, we get "Revert all changes to this record since it was last entered?" with Revert and Cancel choices. These, and "OK", work as expected.

      - It does not matter if we're working with the served files or copies on the desktop.


      I can't figure out why we get our desired custom warning in FileB, but in FileA we're getting the "defined to require a value" message instead. Running File Recovery indicated all is well. I've found other discussions about the "defined require a value" message, but I don't see what we're dealing with. Any ideas?



        • 1. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
          Extensitech

          Are you positive that the checkbox field is the field you think it is? That's pretty easy to miss with checkboxes, since you can't see the field name in layout mode.

           

          Also, is it possible that field1 is getting edited via a different relationship than the one the checkbox is using?

           

          No obvious things are coming to mind for your problem, but these are a couple of things I'd check first to troubleshoot.

           

          Chris Cain

          Extensitech

          • 2. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
            wendy

            Hi Chris; thanks for the reply.

             

            Yes, positive on the field name in both locations.

             

            If I have both files open to the layouts with the checkboxes and change a checkbox in FileB, I see it change instantly in FileA, and I get the desired "WARNING" message when I click out of the field. I click "Yes" to keep the change, or Revert and both fields respond.

             

            Then I change a checkbox in FileA and also see it change instantly in FileB, but I get the "field is defined to require a value" message when I click out of the FileA field. Clicking "OK" changes the value, but the incorrect message is confusing to users.

             

            This is in local, unserved files. I can't see how any other "editing" could be happening...

            • 3. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
              BruceRobertson

              What table occurrence is the layout based on? All the fields are directly from that table occurrence?

              • 4. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                siplus

                wendy wrote:

                 

                Any ideas?



                 

                 

                Welcome to Filemaker 5 (or earlier, as you mention).

                 

                Some strategies that were used back then are just useless nowadays.

                 

                Focus on your real needs and adapt your solution to 2015.

                • 5. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                  RickWhitelaw

                  is the "missing field" a match field? If so place it on the layout and hide it.

                  • 6. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                    wendy

                    Thanks for the replies, and sorry about the delay in getting back to everyone who is trying to help. I hope I can explain our setup adequately:

                     

                    In FileB, Field1 (checkbox) is on a layout named "Brand".

                    - This layout is set to show records from a table in FileB named "BRAND".

                    - Field definition in FileB is as noted above.

                    - This checkbox works correctly (shows the correct warning).

                     

                    There is a relationship between FileA and FileB:

                    - This relationship is defined in FileA and is based on a match relationship between two other fields:

                       "BPCS Name" in FileA = "BPCS Name" (foreign key) in FileB.  (Yes, these fields are named the same in both files.)

                    -The match field is on the layout in FileB. The match field (foreign key) is on the layout in FileA.


                    In FileA, Field1 (checkbox) is on a layout named "Label info".

                    - This layout shows records from a table in FileA named "LIVEJOBS".


                    As noted above, in both layouts Field1 uses values from a value list in FileB.

                     

                    (As I write out the above, something seems ...convoluted but I can't put my finger on it.)

                     

                    Field1 itself is not a match field.

                    The error occurs no matter which record I'm on.

                    The problem occurs both in served files and in local test copies on the desktop.

                     

                    siplus, I agree with you and would love to rebuild our database; unfortunately, everyone in the work world does not have complete control over priorities... When our main database administrator left with short notice, all duties were added to my existing full-time job description (I had been backup admin. Such involuntary "job description expansion" seems to be the "way of the world" these days.)  So I'm sure you can imagine my to-do list, and management does not consider a rebuild to be priority...

                     

                    THANKS!

                    • 7. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                      BruceRobertson

                      My bet is that you're going to find that you are talking about the wrong field.

                      That the field in question actually comes from a non-separated instance of a table that actually exists in File A.

                      Something like that.

                      • 8. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                        wendy

                        "That the field in question actually comes from a non-separated instance of a table that actually exists in File A."


                        Could you be more specific? Both FileA and FileB are legacy and have only one table.



                        • 9. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                          BruceRobertson

                          No. What would be more specific than that?

                          You're saying that something impossible is happening.

                          Therefore: you're looking in the wrong place.

                          Create clones of the files and show us.

                          • 10. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                            wendy

                            Or we have corruption.

                             

                            (I usually do ask questions when I don't understand something...)

                             

                            I uploaded clones, along with a txt doc with how to open and reproduce the problem. I "simplified" some of the names in my post, but the problem should still be obvious.

                             

                            Let me know if the files (Clones1Record forPost.zip) aren't available; this is the first time I've uploaded to the site.

                             

                            I'd be real curious to find out the cause of this issue. Thanks!

                            • 11. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                              wendy

                              I think I goofed on uploading; attaching zipped files...

                              • 12. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                                BruceRobertson

                                Well, that explains a lot. The field involved is Common Graphics.

                                The field notes explain that in 8-24-09 it was set up to ALWAYS return an error any time you edit the field.

                                This in turn ALWAYS presents the custom error message.

                                 

                                In the case that you are talking about, File A is LiveJobs.

                                The field is displayed in layout LiveJobs as a child record (related record).

                                The layout base table is "Live Jobs".

                                 

                                It seems to me the result you are seeing is valid and correct but requires a little explanation.

                                IF you set up a layout in LiveJobs based on the child table "BIBLE" and display this field on THAT layout, you get the full custom dialog warning message.

                                 

                                But since the layout you are using is the parent record, then accepting or reverting an edit would accept or revert the entire parent record, of which BIBLE is only one part.

                                 

                                But it would be interesting to hear from a FileMaker rep what is expected.

                                validation_message.png

                                validation_calc.png

                                • 13. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                                  Extensitech

                                  This really does seem like a puzzler. I spent some time poking at this last night, and I still can't get it. I was pretty confident it would end up being one of a hundred or so ways that I've screwed up similar things in the past, but I think this is a new one.

                                   

                                  If history is any indication, BruceRobertson, you're probably seeing I'm not, but I'll share what I found. I can't explain what I'm seeing with your post, although there's a good chance I'm missing something. I certainly don't have a good explanation of my own.

                                   

                                  I'm attaching a test file I produced to try and get down to just this issue and nothing else. I cannot seem to reproduce the issue. Test (the blue one) is the "parent", Test2 (brown) is the "child". Text is the field. Validation is "0". Error message is "custom message". In this setup, I'm getting the custom message regardless, unlike the OP's example.

                                   

                                  With the original example, I tried a number of things and, while I didn't find the smoking gun, I'll share in case something here "jogs loose" an idea from someone else:

                                   

                                  • Double-checked that the field on LiveJobs is the same as the one on Bible, by changing the field and seeing the value change on the other.
                                  • Removed the two external references to Bible from LiveJobs, replaced them with a new one. Same result.
                                  • Opened the debugger to make sure no scripts are running, doing something unexpected. None were running at all.
                                  • Took down the custom menus to make sure we weren't getting untintended effects from them.
                                  • Changed the error message to make sure the message we were seeing was really coming from the field we were watching, and not some other field with the same name and error message, perhaps in another table or something. It was. (OK, really fishing at this point)
                                  • Recovered both files. No issues found, no change when tried again.
                                  • Tried changing the validation. This was interesting.
                                    • Any validation by calculation worked the same as original (custom message in bibles, fm message on LiveJob).
                                    • Changing to validate "not empty" or "existing value" also produced the issue.
                                    • Changing to validate "strict data type", "member of value list", "in range" or "maximum umber of characters" shows the custom dialog in both files, and also shows it when the field is edited, rather than when the record is committed
                                  • Finally, I created the test files I'm posting here. For the life of me, I can't seem to reproduce the issue, which tells me there's something going on in the original file that I'm not spotting, or not realizing is part of the setup.

                                   

                                  Observations that admittedly don't address the core challenge, but which might offer some better approaches or at least workarounds:

                                  • If you were to change the validation to validate for, say, a 4-digit date (which would also always fail) I think this would at least make the current approach work (for whatever reason).
                                  • I'd encourage you to check out script triggers. The error message is to warn you when you're changing from the parent record, but with field validation you'll get the message even when you're not on the parent record, and the dialog won't necessarily be applicable. You also get the error if you change something and change it back. If you used a script trigger, like onObjectSave or onObjectModify, you could be more specific about when the error shows.
                                  • Finally, the original error message implies that the user is on a specific record making a change to a more general record, while they can't see the implications. It might be worth making the user make that change on a different layout, where they can better assess the impact of the change.

                                   

                                  Chris Cain

                                  Extensitech

                                  • 14. Re: Message "Field1 is defined to require value"--but "not empty" NOT checked?
                                    BruceRobertson

                                    Yes, still a mystery.

                                    I note that if you copy the field definition for Common Graphics and paste it into your test file, the problem being described here does occur.

                                    1 2 3 Previous Next