Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
  • Location

demski's Achievements


Rookie (2/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. Dear comment! I have implemented your example to my real world example and it works like a charm. You made my day! cheers, demski
  2. Great! Thank you for your highly appreciated input on a sunny sunday!
  3. Thanks a lot! I will give it a try on my full example and see what this will return then! BTW: is really enough or does it have to contain the count of elements? I thought that one was mandatory!
  4. Thanks for your response! Yeah, of course, you are right. I mixed exemplary with real world stuff. Let me formulate it again as the xml I am working on contains customer data I am not supposed to show... When importing an xml similar to the example below I receive a second record in FM that shows "text5" in field2 and an empty field3 instead of empty field2 and "text5" in field3. I hope this was better asked? the xml should be: <?xml version="1.0"?> <rows> <row> <node1>text1</node1> <node2>text2</node2> <node3>text3</node3> </row> <row> <node1>text4</node1> <node3>text5</node3> </row> </rows> whereas the xslt would look like <?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="ISO-8859-1" indent="yes"/> <xsl:template match="/*"> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="11/1/03" NAME="" VERSION=""/> <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="" RECORDS="{count(/*/row)}" TIMEFORMAT="h:mm:ss a"/> <METADATA> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="field1" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="field2" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="field3" TYPE="TEXT"/> </METADATA> <RESULTSET> <xsl:attribute name="FOUND"> <xsl:value-of select="count(/*/row)"/> </xsl:attribute> <xsl:for-each select="/*/row"> <ROW> <xsl:for-each select="node1"> <COL> <DATA> <xsl:value-of select="."/> </DATA> </COL> </xsl:for-each> <xsl:for-each select="node2"> <COL> <DATA> <xsl:value-of select="."/> </DATA> </COL> </xsl:for-each> <xsl:for-each select="node3"> <COL> <DATA> <xsl:value-of select="."/> </DATA> </COL> </xsl:for-each> </ROW> </xsl:for-each> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet>
  5. Hi Lauren, unfortunately the video does not load here... Can you add some more information about the script that does this? demski
  6. [Edit: added xslt example] Hi all, Given I have an xml like this: <row1> <node1>text1</node1> <node2>text2</node2> <node3>text3</node3> </row1> <row2> <node1>text4</node1> <node3>text5</node3> </row2> Where node1..n are matched to fields 1..n accordingly, how do I force the xml-import to create an empty field2 at second row instead of putting the value of node3 into it? I have tried constructs like this: <xsl:choose> <xsl:when test="(/results/issues/issue/coverDate) or (not(/results/issues/issue/coverDate))"> <xsl:for-each select="coverDate"> <COL> <DATA> <xsl:value-of select="."/> </DATA> </COL> </xsl:for-each> </xsl:when> <xsl:when test="not(/results/issues/issue/coverDate)"> <COL> <DATA> </DATA> </COL> </xsl:when> </xsl:choose> But this doesn't seem to work. At least it didn't throw any errors but a nonexistent 'coverDate' will drag the data from the next xml element into the 'coverDate' Field in FM. TiA, demski
  7. Hi enquirerfm, I thought of a "helper script" in the Backup DB, which you could call from the script in the original DB. You could call it with a ScriptParameter passing the value of your comparison field to the helper and respond with a Script result saying something like "was equal and ommitted" or "was not equal, step on" As I have no access to a FileMaker at the Moment I am not sure wether you have to add the Backup DB to the external files of the Original DB to have access to the remote scripts. HTH
  8. Maybe like that? 1. Open both DBs side by side (your Original and the Backup) 2. Maybe create a formula field which summarizes some (like ten) fields in both DBs. 3. write a script in the original which displays all records, sorts them and calls a second script in the Backup file, which does the same (show all and sort by the same criteria) 4. now cycle thru the records in the Original and compare each record's new formula field with the corresponding from the Backup file. If they are equal, step to the next record in both files. If not equal, ommit the record in the Backup DB. 5. finally export the ommitted records from your backup and re-import them in your Original file. HTH, demski
  9. Wow, great!! Thank you for sharing this! I will play around soon with it! greets, demski
  10. It is exactly the same here... Any suggestions would be highly appreciated... I would love to use this technique! (already on snow leo 10.6.2 and FM Advanced 10) ((For some reason, the 'show FileMaker Profile' Option didn't work...)) (((found it...)))
  • Create New...

Important Information

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