Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

(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

  • Author

Thanks Baloo,

The error reporting is most helpful!

  • Author

*bump*

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

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.