Newbies furnk Posted March 12, 2009 Newbies Posted March 12, 2009 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 /p> "http://www.w3.org/TR/html4/loose.dtd"> <?php /** * FileMaker PHP Site Assistant Generated File */ require_once 'fmview.php'; require_once 'FileMaker.php'; require_once 'error.php'; $cgi = new CGI(); $cgi->storeFile(); $databaseName = 'client'; $layoutName = 'clientweb'; $userName = $cgi->get('userName'); $passWord = $cgi->get('passWord'); $fm = & new FileMaker(); $fm->setProperty('database', $databaseName); $fm->setProperty('username', $userName); $fm->setProperty('password', $passWord); ExitOnError($fm); $layout = $fm->getLayout($layoutName); ExitOnError($layout); // 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); ExitOnError($record); class EmptyRecord { function getRelatedSet($relationName) { return array(new EmptyRecord()); } function getField($field, $repetition = 0) { } function getRecordId() { } } ?>
Recommended Posts
This topic is 6003 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 accountSign in
Already have an account? Sign in here.
Sign In Now