View source for Main Page
==Overview== FMRPC stands for '''FileMaker Remote Procedure Call'''. It allows you to securely perform resource intensive operations on a machine running FileMaker Server without the need for a plugin or a server-side schedule. These operations can be initiated from either FileMaker Pro or FileMaker Go. Current Version: '''1.02''' == Operations you may want to use FMRPC to perform == * An ExecuteSQL calculation which includes SORT BY, GROUP BY, DISTINCT or aggregate (e.g., SUM, AVERAGE, COUNT) arguments. * An ExecuteSQL calculation when you only want to receive a small number of columns from the result set. * An ExecuteSQL calculation when you only want to receive a small number of rows from the result set. * Looping through a large set of records to assemble a result set or value. * Replacing a value in one or more fields across a large set of records. * Perform a plug-in function from a script running on FileMaker Go. == FMRPC Product Page == To download or purchase FMRPC visit the [http://www.skeletonkey.com/FMRPC FMRPC product page] ==Licensing== There are three different licenses which can be purchased for FMRPC To purchase a license go to the FMRPC web site [http://www.skeletonkey.com/FMRPC here]. '''Workgroup''' * $295 * May be installed on 1 FileMaker Server * Up to 10 simultaneous users * Up to 2 FileMaker files * This is designed to allow a developer to host the FMRPC sample file and their solution at the same time. '''Enterprise''' * $495 * May be installed on 1 FileMaker Server * Unlimited simultaneous users * Unlimited FileMaker files '''Solution Bundle''' * $1495 * For a single, specific vertical solution * May be installed on 1 FileMaker Server for a given instance of a solution * Unlimited simultaneous users * Unlimited FileMaker files (within the single, specific vertical solution) '''Hosting''' * Contact us for pricing * May be installed on an unlimited number of FileMaker Servers * Unlimited simultaneous users * Unlimited FileMaker files == Installing FMRPC == === System Requirements === * '''PC Client''' ** FileMaker Pro 12 or FileMaker Pro Advanced 12 * '''iOS Client''' ** FileMaker Go 12 * '''Server''' ** FileMaker Server 12 or FileMaker Server 12 Advanced '''Please Note''' - When used with FileMaker Server Advanced, FMRPC will use JDBC with the Perform SQL command. This allows a full range of SQL statements such as INSERT, UPDATE, and DELETE in addition to SELECT. When using FileMaker Server (not Advanced), FMRPC's Perform SQL command is limited to SELECT statements. Information on the system requirements to install FileMaker Pro, FileMaker Go and FileMaker Server can be found on [http://www.filemaker.com/products/ FileMaker's web site]. ===Before you Install=== * Make sure you've applied the latest updates to FileMaker Server * Make sure FileMaker Server is running and that XML web publishing is enabled ===Installation=== No additional software needs to be installed on the client. All you need is FileMaker Pro or FileMaker Go. You will need to run the FMRPC installer on your FileMaker Server. If you haven't done so already you can download the FMRPC installer [http://www.skeletonkey.com/FMRPC here]. The download includes installers for both Windows and Mac. Once your download is complete follow these steps to complete the installation: '''Mac''' # Unzip the installer # Open the folder created when you unzipped the file and launch the '''Mac Installer''' application. # Select your installation location # Select the type of installation you want to perform (Standard or Hosting). For more information on the difference between these see the licensing section on this page. # Choose the location where you want to install FMRPC. # When the installer completes the FMRPC web page will be displayed. '''Windows''' # Unzip the installer # Open the folder created when you unzipped the file and launch the '''WindowsInstaller''' application. # Select the type of installation you want to perform (Standard or Hosting). For more information on the difference between these see the licensing section on this page. # When the installer completes the FMRPC web page will be displayed. To install multiple instances of FMRPC, choose either the Hosting provider option on Mac, or hold down the ALT key on Windows when launching the installer. This will allow you to name a new instance of FMRPC and install multiple copies. These copies can then be managed via the 360Admin utility, which is found either in your Program Files or Applications folder. When installing additional instances of the application, only a single Tomcat process will be installed which is shared by all of the FMRPC instances. The FMRPC_Demo.fmp12 file can be hosted on your FileMaker Server to demonstrate FMRPC's features. This file also contains the table and scripts that will need to be copied to your solution to use FMRPC. ===Registering FMRPC=== By default, FMRPC will run in demo mode, which must be restarted every 2 hours. You can remove this restriction by purchasing a license [[http://www.SkeletonKey.com/FMRPC here]]. Once you have purchased a license you can enter your license key by going to the URL below from the machine where you've installed FMRPC. <nowiki>http://[the IP address of your web server]/FMRPC/License.jsp</nowiki> ===Testing the install=== To verify that FMRPC is up and running go to the following URL. <nowiki>http://[the IP address of your web server]/FMRPC/</nowiki> This page shows you the version of FMRPC you currently have installed as well as your license type. If you're currently running in demo mode it also tells you when the demo will expire. ===Uninstalling FMRPC=== If you should need to remove FMRPC from your system, uninstallers are provided for both Mac and Windows. '''Mac''' # Download the FMRPC install file [http://www.skeletonkey.com/FMRPC here] # Unzip the installer # Open the folder created when you unzipped the file and launch the '''Mac Uninstaller''' application. '''Windows''' # Download the FMRPC install file [http://www.skeletonkey.com/FMRPC here] # Unzip the installer # Open the folder created when you unzipped the file and launch the '''WindowsInstaller''' application. # The Windows installer will detect if you have previously installed FMRPC and if so it will display buttons labeled '''Uninstall''' and '''Upgrade''' instead of the Install button you originally saw. # Click on the '''Uninstall''' button. '''360Works Admin''' You can also uninstall FMRPC by clicking the '''Remove''' button in the 360Works Admin utility. ===Updating FMRPC=== To install an updated version of FMRPC, follow the instructions above for Installation. The installer will update an already installed version on the server. After installing the update on the server, follow these steps to update any of your databases that contain FMRPC scripts: # Copy any new fields from the FMRPC table in the FMRPC_Demo.fmp12 file to your file's FMRPC table. # Add the new fields to your FMRPC layout. # Copy the script steps from the FMRPC script in the FMRPC_Demo.fmp12 file to your file's FMRPC script. Replace all of the old script steps, but be careful not to overwrite any steps you've modified. # Copy all of the script steps from the "- FMRPC [Engine]" script in the FMRPC_Demo.fmp12 file to your file's "- FMRPC [Engine]" script. Replace all of the old steps. ==360Works Admin== The 360Works Admin utility is a file that is automatically copied to your hard drive as part of the installation process. It's a Java application that can be used to control FMRPC as well as other 360Works products. It can be found on the Mac in the "Applications" folder and in "Program Files\360Works" on Windows. If you are running FMRPC in demo mode you can use the admin utility to stop and restart FMRPC which will reset the two hour demo. == Using FMRPC == ===Preparing your database for use with FMRPC=== FMRPC is very easy to add to an existing FileMaker database. It can be done in just three steps: '''1. Update Security''' * Make sure that all users who will be calling scripts using FMRPC have the following extended privileges enabled: ** Access via ODBC/JDBC (fmxdbc) ** Access via XML Web Publishing - FMS only (fmxml) '''2. Add the FMRPC table''' * Copy the FMRPC table from the FMRPC_Demo file and paste it into your database * Be sure you do this BEFORE you copy the FMRPC scripts over to your database. This table will be referenced by the FMRPC scripts. '''3. Add FMRPC scripts''' * Copy or import the following scripts from the FMRPC_Demo file into your database ** FMRPC ** - FMRPC [ENGINE] Make sure you move both of these scripts over at the same time. They call each other so copying them over one at a time will break some of the script steps in them. ===Customizing FMRPC settings=== Most users will be able to use FMRPC without any changes to the settings, but in some cases you may need to tweak a few things. We've broken the FMRPC scripts into two parts to make it clear which one can be customized and which one should be left alone. * '''FMRPC''' - This script contains some settings you may want to customize * '''- FMRPC [ENGINE]''' - This script should not be modified. Nothing to see here. Please move along. The FMRPC script has comments inside it that describe all of the things you may want to change in there. The documentation in there should always be considered the most up to date for your version of FMRPC and it supercedes what appears here. Just for informational purposes though here are the options that you should be able to customize within that script. * '''$$FMRPCwebServerAddress''' - This is the web server where FMRPC is installed. * '''$$FMRPCwebAppName''' - Allows you to specify which instance of FMRPC you want to use in a hosted environment with multiple instances of FMRPC running. * '''$FMRPCErrorHandler''' - Allows you to choose whether to display errors to the user. ===Calling FMRPC=== FMRPC performs the following actions: * '''Perform Script''' - Performs a script on the server and waits for the script to complete. * '''Perform Script no wait''' - Performs a script on the server and moves on without waiting for a response. * '''Perform SQL''' - Executes a SQL statement on the server. If the server is running FileMaker Server Advanced FMRPC will use JDBC with the Perform SQL command. This allows a full range of SQL statements such as INSERT, UPDATE, and DELETE in addition to SELECT. When using FileMaker Server (not Advanced), FMRPC's Perform SQL command is limited to SELECT statements. * '''Login''' - Triggers the user to login, once per session, so FMRPC can run. This function automatically runs the first time you try to run an FMRPC script. However, you can call it at anytime. * '''Save Found Set''' - Saves the found set of records so that the found set can be restored on the server when running the "Perform Script" or "Perform Script no wait" actions. * '''Restore Found Set''' - Restores the found set of records on the server so that it matches the found set and current record from the client. When using FMRPC you will always begin by calling the FMRPC script you copied into your database. The script parameter you pass when calling this script will tell FMRPC what you want it to do. To let FMRPC know what you want it to do you'll break your script parameter up into carriage return separated values. * '''Value 1''' - Tells FMRPC what function you want it to perform. Perform Script, Perform Script no wait or Perform SQL. * '''Value 2''' - Will either be the name of the script you want FMRPC to perform or the SQL statement you want it to execute. * '''Value 3''' - (Optional) If value 1 was "Perform Script" or "Perform Script no wait" you can include additional information here that will be passed on as a parameter to the script you told FMRPC to call. You can include more than just three values. Everything except for the first two values will get passed on to the script you tell FMRPC to call. ===Getting Script Results from FMRPC=== To get the result of the script you run with FMRPC, you will need to do two things: 1. Update the script you're calling to store its result in the field FMRPC::ScriptResult (which is a global field and thus is available from any context in your database). 2. Use the Get(ScriptResult) function in the calling script to retrieve that same value. Please note: this only works with the Perform Script, Perform SQL or Login commands for FMRPC; no result is passed back to the calling script with Perform Script No Wait. For example, let's say you were calling the "foo" script: <code> Set Variable [$this; Value:Random] </code> ... using FMRPC: <code> Perform Script ["FMRPC"; Parameter: "Perform Script" & ¶ & "foo"] </code> ... and you wanted the result of "foo" to be set into a variable in the client when FMRPC was done. You would need to add the bolded steps below to those two scripts, respectively: <code> Set Variable [$this; Value:Random] '''Set Field [FMRPC::ScriptResult; $this] '''</code> ... and: <code> Perform Script ["FMRPC"; Parameter: "Perform Script" & ¶ & "foo"] '''Set Variable [$that; Value:Get ( ScriptResult )]''' </code> and ... to get the result from the FMRPC-run script to come back to the calling script on the client. ===Saving and Restoring the Found Set=== FMRPC 1.02 (and newer) includes FMRPC actions to save and restore the client's found set and current record on the server. To use these features: * Copy the "RecordID" field from the FMRPC table to each table that you might want to use with FMRPC. * Right before calling the FMRPC "Perform Script" or "Perform Script no wait" action in your script, add the following script step: ** Perform Script ["FMRPC"; Parameter: "Save Found Set"] * Add the following script step as the first line in the script you're calling with the FMRPC "Perform Script" or "Perform Script no wait" action: ** Perform Script ["FMRPC"; Parameter: "Restore Found Set"] NOTES: The found set on the server will be unsorted unless your script explicitly sorts the records. Large found sets that contain thousands of records may take several seconds to restore. You may encounter errors with huge found sets that contain tens of thousands of records. ==FAQ== '''What script steps can be used with FMRPC?''' FMRPC can run any script step that is compatible with custom web publishing. '''How do I restart the demo?''' If you are running FMRPC in demo mode you can use the 360Works Admin utiltiy to stop and restart FMRPC which will reset the two hour demo. '''How do I submit a bug report?''' <nowiki>http://[the IP address of your web server]/FMRPC/bugreport.jsp</nowiki> ==Additional Resources== ===Videos=== [http://www.youtube.com/watch?v=Xa3VyWO5xJg FMRPC First Look] [http://www.youtube.com/watch?v=mXS8dnWuH4c FMRPC Under the Hood Part 1] [http://www.youtube.com/watch?v=mLtMP6Jrr90 FMRPC Webinar Video] ==Change Log== '''2013-08-08 - FMRPC 1.02''' * Added "Save Found Set" and "Restore Found Set" actions along with a corresponding example in the FMRPC_Demo.fmp12 file * Perform Script actions can now be used when the found set is empty * Fixed FMRPC_Demo file example issues '''2013-06-07 - FMRPC 1.01''' * Fixes OS X 10.6.8 issue (no display of webpage after install) * Fixes license key issue * Fixed FMRPC_Demo file example issues '''2013-06-06 - FMRPC 1.0''' * Initial release
Retrieved from "
What links here
About Skeleton Key Product Support Wiki