AnsweredAssumed Answered

Get editrecord.php to call user's record?

Question asked by furnk on Mar 12, 2009
Latest reply on Dec 9, 2011 by bvondeylen


Get editrecord.php to call user's record?


I apologize for any cross-posting.


I want the editrecord.php file that is installed with site assistant to automatically call the user's record. I have a field named "Web User Id" that equals the $userName or AccountName I could do a find for, but I don't have a clue what php code I would need to execute the find or change the current recid.

Here's the code on the top of editrecord.php, if that helps:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    * FileMaker PHP Site Assistant Generated File

require_once 'fmview.php';
require_once 'FileMaker.php';
require_once 'error.php';

= new CGI();

= & new FileMaker();

// formats for dates and times
    $displayDateFormat = '%m/%d/%Y';
    $displayTimeFormat = '%I:%M %P';
    $displayDateTimeFormat = '%m/%d/%Y %I:%M %P';
    $submitDateOrder = 'mdy';

    $recid = $cgi->get('-recid');
    if (!isset($recid))
        $recid = 1;
    $record = $fm->getRecordById($layoutName, $recid);
    class EmptyRecord {
        function getRelatedSet($relationName) {
            return array(new EmptyRecord());

        function getField($field, $repetition = 0) {

        function getRecordId() {