This topic is 1843 days old. Please don't post here. Open a new topic instead.
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:firstname.lastname@example.org/fmi/xml/FMPXMLRESULT.xml?-db=PushTest&-lay=Table&-findany" curl -X POST -kL --data @findany.fmpxmlresult.xml "user:email@example.com/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="220.127.116.118"></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:firstname.lastname@example.org/fmi/xml/FMPXMLRESULT.xml" Where /tmp/Getlike.txt contains
-dbnames as pr example returns expected list of database names.
By John Link
I have a field named "Databases" with the following values: "CORD", "SDHS", "Y Ballet". This field is displayed as a checkbox set. I recently learned that "CORD" should have been "DSA", so I naively changed "CORD" to "DSA" in the value list but then none of the records that were checked for "CORD" were checked for "DSA", which reminded me that the values in the value list are the values of the field Databases and not labels for checkboxes. I revised the value list to again include "CORD" and its checkbox is again checked for all the records for which it was originally checked.
I wrote a script, shown in one of the attachments, to insert "DSA" into the Databases field for each of the records that contains "CORD" in that field. When I run the script I get an error message saying "Databases" is defined to contain only specific values, and that I must enter a valid value. How can DSA not be a valid value when it is included in the value list for the field? How can I accomplish what I want to do?
Does programming scripts in FileMaker ever get easier? I don't write many scripts, but when I do I find it surprisingly difficult to accomplish what I think would be the simplest of tasks.
Thanks in advance for your help,
By Tony Diaz
The Genre data is already arranged like this:
Genre::ID (Unique Key)
The Platform data is 'simple'. ID and Name. But each item could be multiple platforms. (Example #1 vs. Example #2)
An item can have multiple Genre Categories related to it, and those usually have a single choice from within their Category, but might have multiples.
It's supporting the possible multiples that I'm trying to work out. At this point there's 15 possible Genre Categories that each Item could have a selection from. Most have 4-6 of them.
Example 1: Items::Table on the left, Genre::Table on the right, with some Genre Categories (Genre, Perspective, Pacing, Gameplay, Interface, Setting) and their sub-options.
This one has just one sub-option per category.
Example 2: The Gameplay Genre Category has two sub-options related to it.
Example Genre Table content:
Just cracking the surface on One to One and One to Many relationships, I don't think this scenario is quite covered this way.
Would each of those Genre Categories be portals showing only their related category ID?
I presume that I would add fields to the Items::Table so I can pull related records:
But those only support one relationship.
Would I make value lists from those Genre Categories and Platforms and set them as tick box fields?
By Tony Diaz
How do I set a field with a value list item from a script, from a set of tick box values? .. or remove a value list item, but leave whatever else is there alone?
Looks like GetValue with the name of the value list and the position # of the value, but I'm sure that also means that if I change that value list, I need to change any scripts that reference them by position # too..
Something like detecting if a string is already there, and if not add it, surrounded by C/Rs, unless it's the first item entry?
For the first time a field is set, I presume I could just Set Field (field ; "Value List Item"), and if there's only one entry/line in it, just clear it. But if there's already a value there, I just want to select an additional one.
[FOR IMMEDIATE RELEASE]
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.
Software Division Manager, 24U s.r.o.
(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.
Who Viewed the Topic1 member has viewed this topic:arni