Sign in to follow this  
Followers 0
ggt667

When exporting XML as fmxmlresult.xml when does FilMaker populate the content of the layout attribute?

1 post in this topic

Posted (edited)

When exporting XML as fmxmlresult.xml when does FileMaker populate the content of the layout attribute?

Usually it looks like

<DATABASE DATEFORMAT="D/m/yyyy" LAYOUT="" NAME="Menu.fp7" RECORDS="51" TIMEFORMAT="k:mm:ss "/>

Yet sometimes it looks like this

<DATABASE DATEFORMAT="D/m/yyyy" LAYOUT="menu" NAME="Menu.fp7" RECORDS="51" TIMEFORMAT="k:mm:ss "/>

Then again when querying the XML RPC it always look like this

<datasource database="Menu.fp7" date-format="MM/dd/yyyy" layout="menu" table="Menu" time-format="HH:mm:ss" timestamp-format="MM/dd/yyyy HH:mm:ss" total-count="0" />

Asking the question myself, answering the question myself as well. Checking the following checkbox populates the LAYOUT-attribute of FMPXMLRESULT

FMXMLRESULT LAYOUT populate.png

Edited by ggt667
Solved

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By Quito
      Hi FMForums Community,
      After exporting PubMed records in XML format (where the default file name is pubmed_result.xml), the first two lines within the file must be removed in order to import pubmed_result.xml into FileMaker (14 Adv, MacOS Sierra) using a custom .xsl file.
      Within the ArticleIdList subset there is the ArticleId, with multiple IdType. I am including the relevant XML and XSL portions.
      ----------------
      XML
      <PubmedArticleSet>
        <PubmedArticle>
          <PubmedData>
              <ArticleIdList>
                  <ArticleId IdType="pubmed">27167443</ArticleId>
                  <ArticleId IdType="pii">S1806-37132016000200162</ArticleId>
                  <ArticleId IdType="doi">10.1590/S1806-37562016000000114</ArticleId>
                  <ArticleId IdType="pmc">PMC4853075</ArticleId>
              </ArticleIdList>
          </PubmedData>
        </PubmedArticle>
      </PubmedArticleSet>
      ------------------
      XSL
                              <COL>
                                  <DATA>
                              <xsl:for-each select="PubmedData/ArticleIdList">
                                  <ArticleId>
                                     <xsl:for-each select="*">
                                        <xsl:value-of select="." />
                                        <xsl:if test="position()!=last()">
                                        <xsl:value-of select="'&#xD;'"/>
                                        </xsl:if>
                                     </xsl:for-each>
                                  </ArticleId>
                              </xsl:for-each>
                                  </DATA>
                              </COL>
      -------------------
      The result I'm getting after importing is:
      27167443
      S1806-37132016000200162
      10.1590/S1806-37562016000000114
      PMC4853075
      But I would like to include the ArticleId IdType attribute to make it look like this:
      pubmed: 27167443
      pii: S1806-37132016000200162
      doi: 10.1590/S1806-37562016000000114
      pmc: PMC4853075
      In another topic within fmforums.com there was a suggestion to use @ to capture multiple attributes within a subset.  Something like:
      <xsl:value-of select="ArticleId/@IdType" />
      What should the xsl contain in order to make pubmed: pii: doi: and pmc: visible?
      Many thanks in advance.
      Kind regards,
      Daniel
    • By Anna.anto
      Attention: Before posting in the general discussion forum please review the other forums that would best suit your topic.
      If you cannot find one then you may delete this text and post your topic in this forum.
      Hi all, I need to import into filemaker table an XML file as this:
      <?xml version="1.0" encoding="utf-8"?>
      <Account>
        <Field APIName="WrntyID">6029065</Field>
        <Field APIName="ExternalID">1761A</Field>
        <Field APIName="Name">sayIT SA</Field>
      </Account>
      now I'am trying to create the xls file.
      This is my xls file....
      <?xml version='1.0' encoding='UTF-8'?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:template match="/">
              <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
                  <METADATA>
                      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="WrntyID" TYPE="TEXT"/>
                      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ExternalID" TYPE="TEXT"/>
                      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Name" TYPE="TEXT"/>            
                  </METADATA>
                  <RESULTSET>
                      <ROW>
                          <COL>
                              <DATA><xsl:value-of select=“Account/Field[1]" /></DATA>
                          </COL>
                          <COL>
                              <DATA><xsl:value-of select=“Account/Field[2]” /></DATA>
                          </COL>
                          <COL>
                              <DATA><xsl:value-of select=“Account/Field[3]” /></DATA>
                          </COL>
                          </ROW>
                  </RESULTSET>
              </FMPXMLRESULT>
          </xsl:template>
      </xsl:stylesheet>
      This instruction <xsl:value-of select=“Account/Field[1]"/> doesn't work.
      What is the right syntax to retrive the value of the first TAG FIELD? Then the second end so on...?
      Many thanks
      Anna
       
    • By fm8443
      I have 4 Tables of Sales Records (1 per Store) for the same 1000 products (each sold in the 4 Stores).   Table1 (T1) has 30,000 records T2 has 50,000 records T3 has 10,000 records T4 has 10,000 records   The fields in the 4 Tables have different names and contain similar “core” content.   Tables are added to each month with additional records (imported into FM 14 Pro Advanced from Excel).   Unfortunately the same Products are named slightly differently in each of the 4 tables.  Each store / table has a (text) Product-ID but (for the same product) it is different per store. I do want to rectify this “naming problem” (perhaps in a Table #5?)  so I can produce a report showing sales for each of the 1000 products across all 4 stores (grouped by date etc.) I’m not sure how to structure/carry-out this in Filemaker most effectively.  Any ideas?   Ultimately, when the data is clean, I want to upload ALL the records (e.g. 100,000 records) in one export into one Excel spreadsheet so I can run a Pivot Table (Cross-Tab) report.   Do I need to combine the 4 Tables into 1 Master Table before doing an Export on the Master Table? If so, how would I do this?   Thanks for any ideas about this?
    • By shevyshevy
      I have come across this technique severally on this forum, but I can't figure out how this really works. Right now I am faced with a situation that requires similar technique and I can't seem to get it work.
      I have Table A and Table B.
      1. I want to script an import Process that will first export all records in Table A into Table B (kinda A Clone Copy of Table A) Thats just my basic objective
      2. Then from there, I would want to be able to do similar Process but this time, I will only update the records in Table B with that of Table A using a match field.
      3. I will also love to perform the process based on a found count. ie after performing a find of specific records
      I think If I can be guided on achieving NO. 1, then I can similarly script the others..
       
    • By Cyrus
      I'm using Filemaker Pro 11 in Windows 7, trying to automate the exporting of files from container fields.  I've written a script that goes through all the records to export the files in the container fields while skipping empty container fields.  The code works well, except that there are a number of records with container fields where I get the "Container fields cannot be exported." error.  When I try go to these records and try manually exporting the container field contents by right clicking, the "Export Field Contents..." option is grayed out, though I am able to open the document and then manually save it.  There are, however, way too many of these cases for me to practically do this one by one, so I'm hoping if someone has an idea what's going on here and how I might be able to automate the exporting of these fields that are giving me this error.
       
      To help me troubleshoot this, I wrote a shorter code that focused on exporting the field contents of just one record.  This helped me figure out which records were giving me this error.  Here's the code:
       
      If[not(isEmpty(TABLENAME_::FIELDNAME))]
           Set Variable [$filePath; Value:"filewin:" & Get(DocumentsPath) & TABLENAME_::TABLE_ID_FIELD]
           Export Field Contents [TABLENAME_::FIELDNAME; "$filePath"]
      End If
       
      I've been searching and trying a bunch of different things, but with no luck.  Any tips and pointers would be greatly appreciated.
       
      Thanks!