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.
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?
$update_record_data = array("stubborn_field" => 'N');
$editRecord =& $fm->newEditCommand($layout_name, $rec_id, $update_record_data);
$resultRecord = $editRecord->execute();
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.
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...