Skip 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.

editrecord.php calls user's record

Featured Replies

  • Newbies

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() {

        }

    }

    

    

?>

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.