Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5664 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Greetings FMers,

I am experiencing some odd behavior I am trying to track down and document. I am using PHP Site Assistant to generate a web interface (iPhone, actually) for a FileMaker Server 10 Advanced hosted table.

When I generated an 'out of the box' full PHP site, I was unable to edit records in my table. Submitting the edited record invariably bumped me back to a PHP login screen. It took near forever to figure out that it wasn't a permissions problem and trace it to the validation of a few fields in my table.

(is there a debug option somewhere that I am missing that will report what actual errors are occurring? I build these into my PHP/Perl Scripts!)

Specificly, if I set any field to validate and require 'not empty', AND the value for that field does NOT change on the web form, it causes my PHP edit record script to bail out to the login screen. I've double checked that the approriate fields are displayed, have values, and such.

If I do change the value of the field on the web form, than the edit will work, even with the 'not empty' validation.

The validation works appropriately when I am using FileMaker natively.

If I turn off 'not empty' validation, and instead

validate by calculation = not IsEmpty(field)

my PHP edit scripts work fine.

So what am I missing that PHP barfs on any field validated by 'not empty'? or is it truly a bug?

BTW, I'm running Server 10 Advanced 10.0.1.64; I see that there are updates available, and will get those installed soon. I didn't see a patch that enumerated this problem among them.

Thanks for your thoughts.

Tony

Posted (edited)

(is there a debug option somewhere that I am missing that will report what actual errors are occurring? I build these into my PHP/Perl Scripts!)

Yes if an error occurs The API will return a Filemaker_Error object (it's an extension of PEAR_Error) you can check for it with the static isError() function in the Filemaker Class

e.g.


$result = $record->commit();

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

	echo 'Error: (' . $result->getCode() . ') ' . $result->getMessage() . "n";

	exit;

}

As to the rest of your post, I haven't run into this so I'm afraid I can't be of much help there. It certainly sounds like a bug though.

Edited by Guest
Posted

*bump*

Can anyone report that they are using FileMaker PHP and can successfully validate records with a field rule of "not Empty"?

Posted

The attached works for me with:

FM Server Version 10.0.1.64 on IIS / Win2K3

PHP code on LAMP

My general feeling on tweaking the SA code is that you'll spend more time fixing unintended consequences than building what you need from scratch. My guess is that's what's at play here.

testNotEmptyValid.zip

This topic is 5664 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.