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.

Is there a way to throw FMPXMLRESULT as payload at CWP to create new records in FileMaker?

Featured Replies

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" "http://127.0.0.1/fmi/xml/FMPXMLRESULT.dtd">
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
  <ERRORCODE>0</ERRORCODE>
  <PRODUCT BUILD="03/16/20" NAME="FileMaker Web Publishing Engine" VERSION="18.0.4.428"></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.

Edited by ggt667

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.