August 28, 200916 yr This has really got me stumped. I am trying to create a new record from our website when someone fills out a form. I've done this before, but for some reason every time I try to do it I get a Filemaker Error 101 Record is missing. Here is what I have $form = $fm->createRecord('Web.Forms'); if(isset($_POST['HomeNum'])) $form->setField('Contact.Home', $_POST['HomeNum']); if(isset($_POST['MobileNum'])) $form->setField('Contact.Mobile', $_POST['MobileNum']); if(isset($_POST['Email'])) $form->setField('Contact.Email', $_POST['Email']); ... $result=$form->commit(); if (FileMaker::isError($result)) { $error=$result->code; echo " Error $error: " . $result->getMessage() . ""; }else{ echo "Your answers have been saved. Thank you for your time.";} When I run this I get "Error 101: Record is missing". I checked and the login has fun access to create records in the table and the ability to access the layout via php. I also tried using $form = $fm->newAddCommand and $form->execute with the same results. Any suggestions? Edited August 28, 200916 yr by Guest
August 31, 200916 yr Author FYI for anyone with a similar problem, I solved the issue. The problem originated with the fields that had periods in their names. For instance the Contact.Email field. Once I changed the names to something without periods it works fine. That is pretty annoying considering I name fields that way often for organization. Oh well.
August 31, 200916 yr I would highly suggest using another convention. A period is generally used in SQL to separate database names from table names from field names in queries. e.g. SELECT table1.name, table2.name FROM table1 JOIN table2 ON table1.ID = table2.table1_ID You can always get around it by using text delimiters in your query (e.g. table1.`Contact.name` for MySQL; table1.[Contact.name] for SQL server) but that can be a real PIA to maintain and/or read and is a recipe for bugs down the road.
September 9, 200916 yr If memory serves, you use a period in a field name via CWP to indicate that you want to edit a particular repetition of a field. Hence the error.
Create an account or sign in to comment