BlogFileMaker

Accessing a hosted FileMaker database without file references

By April 29, 2013 September 5th, 2019 No Comments

Recently, I’ve discovered a way of sending  and receiving data to a hosted database on FileMaker Server without hard coded file references using the FileMaker Script Protocol.  This may come in handy if you have applications with remote users over the WAN and the server may change.  Here’s the basic technique:

  1. You can use insert from URL with xml to get the data for a record on the server (be sure to use SSL if you are going to use an account in the URL string). For example:
    "http://user:pw@serveraddress/fmi/xml/fmresultset.xml?-db=opportunity.fmp12&-lay=webOpportunity&__kp_OP_ID=" & opportunity::__kp_OP_ID & "&-find"
  2. Parse the results of the insertURL script step and put them into a scratch table.  You can now compare the local data with data on the server.
  3. You can update the results on the server by passing parameters with the FileMaker script parameter using something like this:
    "FMP://user:pw@yourserver/opportunity.fmp12?script=UpdateDataFromRemote&param=<kp>" & opportunity::__kp_OP_ID & "</kp>" & $fields
  4. In FielMaker go, you can then update the scratch table with the new contents from the server by calling a local FileMaker script with parameters:
    "FMP://~/opportunity.fmp12?script=SetFromWeb&param=" & $$fields

Has anyone else been using the FileMaker script parameter like this?   How well has it worked for you?

 

James Marshall

James Marshall

James has been building solutions in FileMaker for many years, both as an in-house developer and as a consultant.

Leave a Reply

Need to adjust your business processes quickly? We're helping clients use technology to keep their teams productive and running smoothly in these times of uncertainty. Our team can guide yours if you need help in these areas.

Talk to a Consultant