Jump to content

Introduction to FileMaker CWP

This topic is 2587 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Introduction to FileMaker CWP


I've started a new blog on my site where I'm going to be making posts related to the Atlanta FileMaker Developers Group meetings as well as other FileMaker tips and techniques.  Our meeting for July was about FileMaker CWP, so I've written a getting started guide for CWP as my first post.  Please let me know if this is useful or if you have any feedback.


Thank you!

Link to comment
Share on other sites


  • Similar Content

    • By ggt667
      Is there a way to query CWP using FMPXMLRESULT as payload to create new records in FileMaker? Goal is to be able to insert records from command line using curl from FMPXMLRESULT files to avoid a somewhat clunky query from FileMaker XML import.
      I tried the following:
      cd /tmp/ curl -X POST -kL -o /tmp/findany.fmpxmresult.xml "user:[email protected]/fmi/xml/FMPXMLRESULT.xml?-db=PushTest&-lay=Table&-findany" curl -X POST -kL --data @findany.fmpxmlresult.xml "user:[email protected]/fmi/xml/FMPXMLRESULT.xml?-db=PushTest&-lay=Table&-new" A new record is created, however the payload is ignored.
      Payload below FTR
      <?xml version="1.0" encoding="utf-8" standalone="no"?><!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" ""> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="03/16/20" NAME="FileMaker Web Publishing Engine" VERSION=""></PRODUCT> <DATABASE DATEFORMAT="MM/dd/yyyy" LAYOUT="Table" NAME="PushTest" RECORDS="17" TIMEFORMAT="HH:mm:ss"></DATABASE> <METADATA> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="name" TYPE="TEXT"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="number" TYPE="NUMBER"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="date" TYPE="DATE"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="timestamp" TYPE="TIMESTAMP"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="time" TYPE="TIME"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="_global" TYPE="TEXT"></FIELD> </METADATA> <RESULTSET FOUND="1"> <ROW MODID="13" RECORDID="24"> <COL> <DATA>Sweet</DATA> </COL> <COL> <DATA>667</DATA> </COL> <COL> <DATA>06/05/2020</DATA> </COL> <COL> <DATA></DATA> </COL> <COL> <DATA>10:44:15</DATA> </COL> <COL> <DATA></DATA> </COL> </ROW> </RESULTSET> </FMPXMLRESULT> If I simply put the parameters after the "?" in the payload file it works, however INSERTing the actual FMPXMLRESULT would be desirable.
      curl -X POST -kL --data @/tmp/GETlike.txt "user:[email protected]/fmi/xml/FMPXMLRESULT.xml" Where /tmp/Getlike.txt contains
      -dbnames as pr example returns expected list of database names.
    • By HOnza
      24U Software updates fmRESTor for FileMaker(R) Server 18
      The popular PHP connector for FileMaker Data API adds support for new features of FileMaker Server 18 and for easy deployment using Composer
      Prague, CZ -- August 1, 2019 -- 24U Software has released a new version of the popular open-source PHP library designed for PHP developers to easily integrate their code with the RESTful FileMaker Data API without having to learn the FileMaker Data API itself.
      The new version brings support for all new features added to the FileMaker Data API with the recent release of FileMaker Server 18, while maintaining full compatibility with the FileMaker Server 17 Data API as well.
      fmRESTor is now also available via Composer, a popular application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. Using Composer makes it even easier for PHP developers to maintain future compatibility of their code depending on fmRESTor.
      Features of fmRESTor:
      One object class conveniently handles everything Automatically generates authentication token Re-uses existing token to avoid unnecessary additional connections Automatically re-generates expired token Handles exceptions and provides meaningful error results Can handle raw form data for easier container uploads Provides customizable debug logging  
      Features added in the new version:
      Simple way to run a script and wait for its result with FileMaker Server 18 Methods for gathering information about FileMaker Server 18 and the accessed database Support for easily gathering value lists, i.e. for populating selects Added to Composer to make it easier for developers to maintain dependencies  
      fmRESTor requires PHP 5.6 or newer, including PHP 7, with support for cURL, and a FileMaker Server 17 or 18 to connect to.
      Availability and Pricing
      fmRESTor is available free of charge as open source, licensed under the "GNU LGPLv3" License. 24U greatly appreciates any feedback and contributions, but cannot provide free support for the tool. Developers may hire 24U to help them with their projects, either by purchasing paid support or by utilizing 24U's custom development services.
      More information: https://www.24usoftware.com/fmrestor
      About 24U Software
      With customers in 68 countries and 28 years of experience with the FileMaker platform, 24U excels in developing new or taking care of existing custom apps, optimizing their performance, identifying and resolving potential issues and liabilities, improving reliability, stability and scalability, integrating them with other systems including various hardware devices, and extending them beyond expectation.
      As a platinum member of the FileMaker Business Alliance, 24U helps global businesses around the world to maintain sustainable growth by working with their in-house developers or completely taking care of the maintenance and development of their business solutions.
      Customer contact:
      HOnza Koudelka
      Software Division Manager, 24U s.r.o.
      [email protected]
      Press Contact:
      [email protected]
      (c)2019 24U s.r.o. All rights reserved. 24U, 24U Software, and fmRESTor are trademarks of 24U s.r.o. FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries. All other trademarks are the property of their respective owners. Pricing and availability are subject to change without notice.
    • By Terry Bohach
      Moving from FMP 14 to FMP 17.  
      PHP getValueListTwoFields works on FMP 14. —> 500 error on FMP 17.
      if I comment out the command the page displays just fine.
      I have tried many things nothing works.
      ——- example ——
      $layout =& $fm->getLayout('phpPTRequest');
      $values = $layout->getValueListTwoFields("VLReason");
      foreach($values as $value)
      $VLReason .= '<input name="Reason" type="radio" value="' . $value . '">'. $value .'&nbsp;&nbsp;';           
    • By jstewart30
      Running FMS 13 and trying to run a simple PHP page from my website to access a database, but I'm only getting a blank page.  Not sure if it's a port forwarding issue or a PHP issue, or something else.  If I put my .php file and the includes ("FileMaker.php" file and "FileMaker" folder from the FMS PHP .zip file) in the fmi-test folder on my FM server and access it locally (http://localhost/fmi-test/myphpfile.php), the PHP file works fine and returns data, so I don't think it has any inherent issues, and presumably my FMS is set up correctly.  Putting the same .php file and includes on my web server, though, results in a blank page only.  The includes are in the same directory as the php file itself.  Here's the php file (I've changed the IP address and database names to protect the innocent but they're correct):
      ini_set('display_errors', 1);
      include_once('FileMaker.php');  /* have also used require, include, and require_once with no change */

      $fm = new FileMaker("MyDatabase", "http://myfilemakerserver:8888", "Admin", "");   /*no password*/
      $findCommand = $fm->newFindCommand("MyDatabase");
      $findCommand->addFindCriterion("Phone", "303-555-1234");
      $findCommand->setRange(0, 1);
      $result = $findCommand->execute();
      if (FileMaker::isError($result)) {
      $record = $result->getFirstRecord();
      $name = $record->getField("Customer Name");
      $status = $record->getField("Status");
      echo("$name - $status");
      Infuriatingly I get no errors or feedback, just a blank page when I run this file from my website (but again it works fine locally on the FM server machine). I've confirmed PHP is working on my website as I can do a simple phpinfo() file in the same directory and it runs fine and displays the PHP info.  If I direct a web browser to the same "http://myfilemakerserver:8888" (not the real address obviously, but it is port 8888) I get the "Filemaker Database Server Website" page, so the port forwarding seems to be correct.  I have port 8888 forwarding to port 80 of my FM Server.  I don't have port 443 forwarded to that machine as that's being used for another device on our network, but I assume if I'm not making "https" requests that it should work fine (but maybe that's my problem?).  
      I assume it's just something simple but I've been beating my head against a wall for the better part of the day on this.  Any help would be greatly appreciated.
    • By Joost Miltenburg
      We are running FMserver with custom webpublishing. People can connect to the website and see pictures that are attached to propositions.
      The pictures folder is located on the FMServer as well and getting pretty big now. So we are complating moving the folder ( it is currently located in htdocs ( running on a Mac )).
      How do we reconfigure FMServer/apache to do this?
      Kind regards....
  • Who Viewed the Topic

    12 members have viewed this topic:
    jbmia  Spidey  thorbo  kroywen19  ratherbsailing  AussieM  Guromaz  STW2011  Şemsi Saracoğlu  PKF  kims  gela 
  • Create New...

Important Information

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