ggt667

Members
  • Content count

    308
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by ggt667

  1. "-H Authorization: ShippoToken " & $token & " -H Content-Type: application/json -d " & $json I believe above should make a valid string.
  2. I export 5000-10000 records on a regular basis, and occationally millions; I have not yet seen this error before you posted this here. How much memory do you have?( all involved machines to reproduce the error ) Also how much memory is free on the bootdisk. Do you use for-each in XSLT? Then change to template. Of course the number of fields pr record also counts, both calculations and keys do spend a considerable amount of resources; Compared to plain data fields. This may or may not be a design issue, not necessarily one of XML, but I do not know enough to make any conclusion.
  3. So are you saying that if somebody searches this forum and have the same issue as you; you are not going to give them the answer?
  4. Sometimes XML/XSLT is better with a good tool; I bought Xmplify The moment the files are 2 MB and up you are not really interested in using for-each; you want to call template
  5. Also your code will benefit from keeping hierarchy; I do recommend 2 spaces pr tab. The error may or may not be open brackets. I put indented copy here: http://termbin.com/b8zn
  6. Did you consider FX.php? It's for free It uses 20-30% less resources compared to phpFileMaker API( architectural benefit ) It actually has good examples. That said there are benefits to using a better MVC / MVVM these days such as f ex Angular or the combination of Angular and FX.php is also a good fit.
  7. Is this really the examples out there? When we wrote FX.php at least we made sure it had complete examples.
  8. $show = 1; $skip = $_REQUEST['skip']; if( ! isset( $skip ) ) { $skip = 0; } $request->setRange( $skip, $show ); Oh, then you would make show=1 like as above
  9. You will most likely write your code in a way that your user can tell the browser something like this: http://www.domain.tld/scriptname?skip=10&show=20 $show = $_REQUEST['show']; $skip = $_REQUEST['skip']; if( ! isset( $skip ) ) { $skip = 0; } if( ! isset( $show ) ) { $show = 20; } $request->setRange( $skip, $show );
  10. What would you like to see? FX.php and pyFileMaker is already old news. FXSwift? There is already fm perfect. FXAngular? There is already fmAngularJS. However that is a bit dated. There should be fmAngular for Angular4 by now. FXObjc? Or perhaps FXHaskell? Or perhaps just general use cases of existing technology.
  11. The only problems you may have with XSLT these days after you get your XSLT up and running is that some sources are async, this will make FileMaker hemorrhage. One way to get around this is to use nginx as a reverse proxy possibly powered by your own express / sinatra / kitura or similar library. Alternatively you can do a batch download using curl/crontab or similar to your local server or volume.
  12. If you are to use the latter universal method mentioned; notice it has 3 for-eaches and you have a load you should make 2 versions of the xslt, one that uses for-each and one that uses apply-templates and see which one uses more resources. IIRC for-each uses more resources by a factor of 6 or so. Also I'm not sure if making everything TEXT is purpose full. Even though all data using comma separator should use "."-for decimal separator on the data layer, using TEXT may be an adventurous path to follow.
  13. With the xslt above this is the output: $ xsltproc steve2fmpxmlresult.xslt SteveXML\ RecordShort.xml <?xml version="1.0" encoding="UTF-8"?> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="" NAME="" VERSION=""/> <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="" RECORDS="2" TIMEFORMAT="h:mm:ss a"/> <METADATA> <FIELD NAME="id" TYPE="NUMBER"/> <FIELD NAME="UserLogin" TYPE="TEXT"/> <FIELD NAME="UserEmail" TYPE="TEXT"/> <FIELD NAME="FirstName" TYPE="TEXT"/> <FIELD NAME="LastName" TYPE="TEXT"/> <FIELD NAME="UserRegistered" TYPE="TEXT"/> <FIELD NAME="UserNicename" TYPE="TEXT"/> <FIELD NAME="Description" TYPE="TEXT"/> <FIELD NAME="UserRole" TYPE="TEXT"/> <FIELD NAME="AreyouVATRegistered" TYPE="TEXT"/> <FIELD NAME="VATNumber" TYPE="TEXT"/> <FIELD NAME="TaxStatus" TYPE="TEXT"/> <FIELD NAME="HQID" TYPE="NUMBER"/> <FIELD NAME="UserUpdated" TYPE="TEXT"/> <FIELD NAME="DefaultFrameSize" TYPE="TEXT"/> <FIELD NAME="DefaultFrameRate" TYPE="TEXT"/> <FIELD NAME="DefaultVideoFormat" TYPE="TEXT"/> <FIELD NAME="DefaultCodec" TYPE="TEXT"/> <FIELD NAME="DefaultColorSpace" TYPE="TEXT"/> </METADATA> <RESULTSET FOUND="2"> <ROW MODID="0" RECORDID="1"> <COL> <DATA>29234</DATA> </COL> <COL> <DATA>bill@bubba.ie</DATA> </COL> <COL> <DATA>bill@bubba.ie</DATA> </COL> <COL> <DATA>bill</DATA> </COL> <COL> <DATA>jones</DATA> </COL> <COL> <DATA>2017-01-09</DATA> </COL> <COL> <DATA>bubbabill-ie</DATA> </COL> <COL> <DATA>We are a full service shrimp company </DATA> </COL> <COL> <DATA>flyer|bbp_participant</DATA> </COL> <COL> <DATA>1</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA/> </COL> <COL> <DATA>29234</DATA> </COL> <COL> <DATA>20170428</DATA> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> </ROW> <ROW MODID="0" RECORDID="2"> <COL> <DATA>29235</DATA> </COL> <COL> <DATA>bill@bubba.ie</DATA> </COL> <COL> <DATA>bill@bubba.ie</DATA> </COL> <COL> <DATA>bill</DATA> </COL> <COL> <DATA>jones</DATA> </COL> <COL> <DATA>2017-01-09</DATA> </COL> <COL> <DATA>bubbabill-ie</DATA> </COL> <COL> <DATA>We are a full shrimp service company </DATA> </COL> <COL> <DATA>flyer|bbp_participant</DATA> </COL> <COL> <DATA>1</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA/> </COL> <COL> <DATA>29234</DATA> </COL> <COL> <DATA>20170428</DATA> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> <COL> <DATA/> </COL> </ROW> </RESULTSET> </FMPXMLRESULT>
  14. Not really, that part is more for you not going mad in this case. Now that part is updated. You should also put there layout name and database name
  15. My guess is that this is very close to what you are looking for: $cat steve2fmpxmlresult.xslt <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes' /> <xsl:template match="/*"> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="" NAME="" VERSION="" /> <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="" RECORDS="{count(/data/post)}" TIMEFORMAT="h:mm:ss a" /> <METADATA> <FIELD NAME="id" TYPE="NUMBER" /> <FIELD NAME="UserLogin" TYPE="TEXT" /> <FIELD NAME="UserEmail" TYPE="TEXT" /> <FIELD NAME="FirstName" TYPE="TEXT" /> <FIELD NAME="LastName" TYPE="TEXT" /> <FIELD NAME="UserRegistered" TYPE="TEXT" /> <FIELD NAME="UserNicename" TYPE="TEXT" /> <FIELD NAME="Description" TYPE="TEXT" /> <FIELD NAME="UserRole" TYPE="TEXT" /> <FIELD NAME="AreyouVATRegistered" TYPE="TEXT" /> <FIELD NAME="VATNumber" TYPE="TEXT" /> <FIELD NAME="TaxStatus" TYPE="TEXT" /> <FIELD NAME="HQID" TYPE="NUMBER" /> <FIELD NAME="UserUpdated" TYPE="TEXT" /> <FIELD NAME="DefaultFrameSize" TYPE="TEXT" /> <FIELD NAME="DefaultFrameRate" TYPE="TEXT" /> <FIELD NAME="DefaultVideoFormat" TYPE="TEXT" /> <FIELD NAME="DefaultCodec" TYPE="TEXT" /> <FIELD NAME="DefaultColorSpace" TYPE="TEXT" /> </METADATA> <RESULTSET FOUND="{count(/data/post)}"> <xsl:apply-templates select="/data/post" /> </RESULTSET> </FMPXMLRESULT> </xsl:template> <xsl:template match="*[name() = 'post']"> <ROW xmlns="http://www.filemaker.com/fmpxmlresult" MODID="0" RECORDID="{position()}"> <COL><DATA><xsl:value-of select="id" /></DATA></COL> <COL><DATA><xsl:value-of select="UserLogin" /></DATA></COL> <COL><DATA><xsl:value-of select="UserEmail" /></DATA></COL> <COL><DATA><xsl:value-of select="FirstName" /></DATA></COL> <COL><DATA><xsl:value-of select="LastName" /></DATA></COL> <COL><DATA><xsl:value-of select="UserRegistered" /></DATA></COL> <COL><DATA><xsl:value-of select="UserNicename" /></DATA></COL> <COL><DATA><xsl:value-of select="Description" /></DATA></COL> <COL><DATA><xsl:value-of select="UserRole" /></DATA></COL> <COL><DATA><xsl:value-of select="AreyouVATRegistered" /></DATA></COL> <COL><DATA><xsl:value-of select="VATNumber" /></DATA></COL> <COL><DATA><xsl:value-of select="TaxStatus" /></DATA></COL> <COL><DATA><xsl:value-of select="HQID" /></DATA></COL> <COL><DATA><xsl:value-of select="UserUpdated" /></DATA></COL> <COL><DATA><xsl:value-of select="DefaultFrameSize" /></DATA></COL> <COL><DATA><xsl:value-of select="DefaultFrameRate" /></DATA></COL> <COL><DATA><xsl:value-of select="DefaultVideoFormat" /></DATA></COL> <COL><DATA><xsl:value-of select="DefaultCodec" /></DATA></COL> <COL><DATA><xsl:value-of select="DefaultColorSpace" /></DATA></COL> </ROW> </xsl:template> </xsl:stylesheet>
  16. I changed the template and filled in your data. My example method has been in use since FileMaker 5.5
  17. If you are on a mac this is how to test your stuff: xsltproc Steve.user-export-short.xslt SteveXML\ RecordShort.xml | tidy -i -xml -wrap 0 Usually you want to call 1 template for the FMPXMLRESULT and 1 for each record.
  18. How can I get ESS access to PostgreSQL from FM11SA?
  19. What does that mean?
  20. I concatenate 2 PDF files using ghostscript on the Mac, not sure how to do that on Windows, should be a similar way. If you like your PHP approach I do recommend looking into the way I write about in my blog: http://wethecomputerabusersamongst.blogspot.com/2013/10/execute-php-script-from-filemaker-with.html?q=mercutio
  21. You can design your solution for this make a designated folder in the Documents folder of the user running. Example: ~/Documents/designatedfolder If you run TimeMachine, make sure you disable your designated folder for the FileMaker file(s) in question For backups do yourself a favour and do an export records of the type FileMaker to the designated folder named with a timestamp; Example ~/Documents/designatedfolder/designated-2017-04-15.fmp12 Never use the same machine for FileMaker Server and other tasks at the same time; only exception is to keep FMPA installed on the server in case of emergency, do not launch until Server is stopped. And only use for repairing the broken files from the server. Never used a repaired file; only export its data.
  22. I have access to latest postgresql from FM11SA using ESS.
  23. 512 Record was already modified by another user You say nothing about how you UPDATE the data. Which OS does the machine that runs FM11SA run? When I do what you describe I export a selection of data AS XML and do an XML / XSLT / tr -d / tidy / xsltproc transformation on the command line and then do an UPSERT based on recid / modid.
  24. cron or php? Using cron you are usually better off using the system mailer.