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.

Using FM PHP Site Assistant Issue

Featured Replies

I have a database that we use on our school district for teacher evaluations. Since we have over 500 teachers, I am hoping we can save on the cost of purchasing FileMaker by creating a PHP web front end to the database.

I have everything setup in FileMaker, including authenticating to our AD/OD servers (external authentication).

I created the Full Site using the FileMaker PHP Site Assistant, and it is working, EXCEPT…

When I click the Edit Record, and make a modification, then click the SAVE RECORD button, I get this error

Error: 509 - Field requires a valid value

I have even creating a new layout with only 3 fields on it (all editable TEXT fields), and used that layout for the editrecord.php file. Still no luck.

Any ideas on what to look for to correct this?

Solved by Bryan VonDeylen

Go to solution

This usually occurs because a field in the record requires something - not necessarily one of the fields being addressed. Common culprits: date fields that require a value, dates being entered in the wrong format (ie, European when FM requires US), fields that require validation that are not being addressed, etc

Check all the fields in the table for something that is a required field not being addressed, or that has some form of validation on it.

Yes Bryan. Webco is right. Do one more thing. First you should also take a field which will be calculated as Get(RecordID). By which you will be able to get the unique record id of every record. Post this record id to edit page and changes will be taken on this basis. try this if not you can also contact me on skype.

  • Author

Not sure what each of you really mean.

What I have done, is created a layout in FileMaker with only three text fields (Goal1, Goal2, and Goal3 are the field names). They are editable using the FileMaker Pro 11 client.

Using the PHP Site Assistant, I used that layout to create the editrecords.php file.

I then tried to edit Goal1 using Safari (after authenticated both as a user and as admin). Both cases failed.

So then I tried logging in and editing a record and this time I didn't modify anything. Just pressed the Save button. Again, I got the error.

I really believe the issue is the editrecords.php file (or the fmview.php file), but the PHP Site Assistant create PHP files which are totally different that the tutorials and anything I have found on the internet, so I am not sure how to troubleshoot this.

Khurshid, I may take you up on your Skype invitation, but before going to that extreme, are you saying just get the Record ID to show on the Edit Screen? If so, I will give this a try, but not sure why that would help.

  • Author

<p>Well, I added these lines to my editrecords.php file</p>

<p> </p>

<div>                                                &lt;tr class=&quot;field&quot;&gt;</div>

<div>                                                    &lt;td class=&quot;field_name&quot;&gt;</div>

<div>                                                        &lt;?php echo str_replace(&#39; &#39;, &#39;&amp;nbsp; &#39;,htmlentities(&#39;RecordID&#39;,ENT_NOQUOTES,&#39;UTF-8&#39;,false));?&gt;</div>

<div>                                                    &lt;/td&gt;</div>

<div>                                                    &lt;td class=&quot;field_data&quot;&gt;</div>

<div>                                                        &lt;?php echo $recid ?&gt;</div>

<div>                                                    &lt;/td&gt;</div>

<div>                                                &lt;/tr&gt;</div>

<div> </div>

<div>The record ID does display, and it appears to be correct, but nothing I add to the fields actually gets saved. What I type in the text field disappears when I press the save button.</div>

<div> </div>

<div>editrecords.php is not allowing me to edit</div>

<div> </div>

  • Author
  • Solution

Found out the following:

I had a Auto Enter Serial Number field called FormID.

Once I removed that field from the layout I was using for Browsing and Editing, everything began to work correctly.

I don't know if it was the name [FormID], or that the text field was an auto entered serial #, or if the field did not allow modification, or if it was because I had validation controls (Unique, Not Empty). In any case, once I removed it from the layout, I was able to successfully edit the record via the web page editrecords.php

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.