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.

reference document for FM PHP API

Featured Replies

  • Newbies

Hello,

I am searching for a reference document that describes the FM PHP API.

 

What would you all recommend?

 

I have found bits and pieces, but not a good old fashioned, comprehensive reference document.  The best I have found so far is from Jonathan Starks website:

http://jonathanstark.com/fm/filemaker-api-for-php-documentation.php

 

That is more of a 'table of contents' format, but it was helpful.

 

My current problem:

I am having a little difficulty executing a FM script from PHP.  The general method I am trying is:

  1. $newPerformScript = $fm->newPerformScriptCommand($layoutName, $scriptName, '');
  2. $result = $newPerformScript->execute();

(By the way, the actual FM script being executed has "Set Field' statements that assign a literal text string to the field.)  Anyway, when I finish step 2 above, I get the following error:

5: Command is invalid (for example, a Set Field script step does not have a calculation specified)

 

Of course the source could be any number of things.  If I am taking t he wrong approach here, I would appreciate it if someone would point me in the right direction.

 

Thanks very much!

- Z

 

 

Solved by zinterest

Go to solution

There IS no "good old fashioned, comprehensive reference document".  The closest you can come is the FileMaker http://www.filemaker.com/support/product/docs/12/fms/fms12_cwp_php_en.pdf

and the example files in the FileMaker Server/Examples/PHP directory (on your server in the Library folder).

 

BTW, I could not duplicate your error message with the code you posted (having first properly defined $layoutName and $scriptName).  Can you post the exact commands in your php script?  You have checked the script by running it in FM successfully, right?

  • Author
  • Newbies
  • Solution

doughemi,

Now, why didn't I think of that . . .

 

You have checked the script by running it in FM successfully, right?

 

I had a (stupid) problem with the script.  With that cleared I am now able to move forward.  I was able to run a few scripts.

 

I have been referencing the FileMaker examples you recommended.  Those are good.  I just wish there was a more comprehensive set of examples.  At least I can continue under my own power.

 

Thanks very much for the help!

 

- Z

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.