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.

Executing Scripts driving me mad!

Featured Replies

Is there any reason this code would not work. It's driving me mad after spending an entire day trying to get it to run a script!

There are no problems with the connection to the database, the layout and the script exists. The script is web compatible.

I don't see any errors just a blank screen and looking at the database the script has not run.

If I run the script from the client it works fine.

Am I being dumb here?

I think I have the latest api - downloaded the server installation package at the beginning of the month (fms_9.0v3_full_ESD)

<?php

require_once('include/FileMaker.php');

require_once('include/commonFunctions.inc.php');

$DB_HOST = 'localhost';

$DB_NAME = 'Sem_data';

$DB_USER = '';

$DB_PASS = '';

$webReg = new FileMaker($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS);

$fmresult = $webReg->newPerformScriptCommand('delegates','test');

$fmresult->execute();

?>

Username / Password?

Easiest way to check what's wrong is to trap for an error e.g.:


require_once('include/FileMaker.php');

require_once('include/commonFunctions.inc.php');



$DB_HOST = 'localhost';

$DB_NAME = 'Sem_data';

$DB_USER = '';

$DB_PASS = '';



$webReg = new FileMaker($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS);



$fmresult = $webReg->newPerformScriptCommand('delegates','t est');

$fmresult->execute();



if( FileMaker::isError($fmresult) ) echo $fmresult->getCode().': '.$fmresult->getMessage();

  • Author

Thanks,

I'm the idiot - I had not given the script a starting layout assuming that the layout specified in the php call to the script would work and that the first record would automatically be selected.

By adding a goto layout script step and some finding to get to the right record (passed to the script as a parameter) I managed to get it to work.

Cheers

Pete

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.