XsTatiC

CWP - Field requires a valid value

Discussion created by XsTatiC on Feb 13, 2016
Latest reply on Feb 13, 2016 by XsTatiC

S.O.S.

S.O.S.

 

Please help.  I'm seriously going to end up in the looney bin.

 

Just upgraded from FM 11 to 14.  All smooth except for the bits that we have connecting our website to FileMaker.  We've been using FX for ages, just because I inherited it and it worked.  Now it doesn't so I'm trying to convert to the proper FM API.

 

Things look straightforward as far as the PHP API goes.  However I can't create a new record from PHP no matter what I try.  I can get any information I want or have permissions to from the database.  I can find and do everything else that needs to be done.  However, no matter what I try I just keep getting the same error when trying to enter a new record.

 

"Field requires a valid value"

 

I'm now trying to test this on a custom layout with a single field.  And I still get the error.  It doesn't seem to matter if I use newAddCommand or createRecord, same result.

 

$fm = new FileMaker("database.fmp12", "xxx.xxx.xxx.xxx.", "user", "pass");

 

$create = $fm->createRecord('new_layout');

$create->setField('firstname', 'Somebody');

$result = $create->commit();

 

if(FileMaker::isError($result)){

    echo($result->getMessage());

    return;

}

 

"Field requires a valid value"

 

$fm = new FileMaker("database.fmp12", "xxx.xxx.xxx.xxx.", "user", "pass");

$create = $fm->newAddCommand('new_layout');

$create->setField('firstname', 'Somebody');

$result = $create->execute();

 

returns - "Field requires a valid value"

 

$fm = new FileMaker("database.fmp12", "xxx.xxx.xxx.xxx.", "user", "pass");

$fmData = array('firstname'=>'Somebody');

$create =& $fm->newAddCommand('new_layout', $fmData);

$result = $createt->execute();

 

returns - "Field requires a valid value"

 

firstname field was indexed and required value/not empty.  I removed all of that to try and get this to work from PHP, but I don't actually want it removed.

 

Server is OS X 10.11.3, FM Server 14.04 (whatever the latest is)... both OS and FM were freshly installed, updated to latest yesterday.

 

Does anybody have any ideas?  Any thoughts that could point me in the right direction?  Help is most desperately needed at this point.

 

My sanity and I appreciate your time.

 

Cheers,

 

Gerry

Outcomes