4 Replies Latest reply on Sep 24, 2014 2:20 PM by azriley

    How to determine source of 507 error (Value in field failed calculation test of validation entry...

    azriley

      Title

      How to determine source of 507 error (Value in field failed calculation test of validation entry option)

      Post


      I have isolated the field causing the 507 error on a new record request.

      It's a Text field type with with options as Indexed/ Auto-enter Data. The auto enter value is 'N' and I'm trying to set it as 'Y'. Whey I view the properties in the layout on the Validation tab it says Validate data in this field `Only during data entry` and allow user to override during data entry. No other checkboxes are checked on the validation tab.

      SO bottom line is it looks like there is no cause for for a validation error but yet that's the error coming back. Can you tell me how to figure out what's going on? Filemaker error messages are pretty generic - is it possible that another field (perhaps that depend on this field) is causing the issue and it is that field is not validating?


      Thanks in advance,

      Aaron

        • 1. Re: How to determine source of 507 error (Value in field failed calculation test of validation entry...
          philmodjunk

          What method are you using to set the field to "Y"?

          Can you click or tab into the field and manually enter the letter "Y"?

          is it possible that another field (perhaps that depend on this field) is causing the issue and it is that field is not validating?

          That would seem possible. But if you can trip this validation error by manually editing the field, that might reveal a clue you aren't yet seeing through whatever script or data import is method is producing this error.

          • 2. Re: How to determine source of 507 error (Value in field failed calculation test of validation entry...
            azriley

            Thanks Phil!

            I am using the API to update the record. Simplified code is at end. Works fine if you set the value to 'N' but does not allow 'Y'...errors out with 507.

            Good idea on working through the record directly.

            Through the filemaker client, if I go to the record and edit within this layout, it's a radio button (empty, Y or N). There appears to be some internal logic. When I select Y a date field & time field are populated with today's date & time. I can clear these out. I view these fields specifically and that does check out. They're populated when you switch to 'Y'.

            Out of the box it's set to N and I can move back and forth between records in this layout. However, when I swtich it to yes and try to move to another record I get a pop-up from FileMaker Pro with the below:

            Error: This amount must be negative and cannot be edited directly once the record displays a balance due or has payments. Click "Revert" now, and then click the "%" button to make changes.

            I get 2 button options on the pop-up, revert record or OK. OK never lets you leave the record so you end up reverting the record anyway.

            So we're getting somewhere, I think. Any ideas on how to discover the source of the field that can't be negative? or the logic that's firing the pop-up? I don't see a pop-up on the layout...nor a 'selected event` type of thing on the checkbox if there is such a thing in filemaker terms. Ideas on how to unravel this mystery?

            Aaron

            $fm->getRecordByID($layout_name, $rec_id);

            $update_record_data = array("stubborn_field" => 'N');

            $editRecord =& $fm->newEditCommand($layout_name, $rec_id, $update_record_data);

            $resultRecord = $editRecord->execute();   

            • 3. Re: How to determine source of 507 error (Value in field failed calculation test of validation entry...
              philmodjunk

              The error message you report is a custom validation error message. Open up manage | Database | fields and check the validation options on other fields in your tables looking for that custom error message.

              If you have FileMaker Advanced, you can save a lot of time spent searching this out by generating a Database Design Report and then do a text search of the report in your web browser for a key phrase in this custom validation error message.

              • 4. Re: How to determine source of 507 error (Value in field failed calculation test of validation entry...
                azriley
                Good stuff. Unfortunately I don't have advanced but with over 500 fields to dig through, on just this set, it looks like I need to get a copy. There was an existing diagram of the database that looked promising under Manage Database > Relationships tab but I don't see the ability to filter or find fields in my copy (FM 13).
                 

                Thanks for your help...