Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Here's the code snippet:

    $fm = new FileMaker( DATABASE, HOSTSPEC, USERNAME, PASSWORD );

    

    $findCmd = $fm->newFindCommand( USERS_LO );

    $findCmd->addFindCriterion( 'Email', $_POST['email'] );

    $result = $findCmd->execute();

    

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

      echo 'Error: ' . $result->getMessage() . '; ' . $result->code;

    }

I get "Error: Field is missing; 102" output from that second to last line.

I've double-checked and the USERS_LO is correctly named. There is an Email field on the layout. I tried a newFindAllCommand just to make sure I was connecting correctly, and it worked. Can anyone help me understand why I'm getting this error?

Thanks,

Chuck

Posted

Try doing the newFindAllCommand again, but put this code right after your perform the find:

echo '<pre>';

var_dump( $_POST['email'] );

print_r( $result->getFields() );

echo '</pre>';

exit;

That will show you the value you are getting from post, and the fields that FileMaker found on the layout.

Posted

I didn't use exactly the code you offered but something similar. Regardless, here's the dump of the $_POST and getFields call:

post = array(3) {

  ["email"]=>

  string(1) "c"

  ["password"]=>

  string(1) "d"

  ["submit"]=>

  string(5) "Login"

}



getFields = array(5) {

  [0]=>

  string(5) "Email"

  [1]=>

  string(9) "FirstName"

  [2]=>

  string(2) "ID"

  [3]=>

  string(8) "LastName"

  [4]=>

  string(8) "Password"

}

So the Email field is definitely on the layout. Suggestions?

Thanks,

Chuck

Posted

yikes! I wish I could be of more help. I thought that maybe the field was from a related table, or the case was different.

I can't think of any reason you are getting that error. Can you perform a find from that same layout, using the same find criteria, logged in as the same user, from FileMaker Pro?

Posted

I figured it out. The privilege set for the web user was set to All No Access for Records, I changed it to Create and Edit in all tables and it seems to be working. Seems odd to me, however, that the find all would work with that privilege setting.

Thanks,

Chuck

This topic is 5033 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.