5 Replies Latest reply on Dec 14, 2009 3:50 AM by comment_1

    XML Import issue related to XML files with one record only

    didier98004

      Title

      XML Import issue related to XML files with one record only

      Post

      Hey

       

      I have a XML import issue.


      I am doing XML import using XSLT file, and I am finding out that my XML import would not fill the record. My XML file source is a complex XML with only one record in each file. After looking over the script carefully (I am sure the XSLT is correct), I found out that the checkbox regarding "Don't import first record" is checked! In my case, that would explain why the import does not work, as my XML file only has one record.

       

      The strange thing is that I have tried to get this checkbox to un-grey and uncheck without any success!!

      Is there is anything I am missing?

       

      There is another thing to report on this though: The reason I know my XSLT is correct for this specific file is that the first time I set up my XSLT and XML import, I did got a record imported successfully (it is still in my database).

      When I set up my script I do remember that I specifically did not check that specific box to make sure my first and only record is imported.

       

      Thanks if you have any input on this that can allow me to uncheck this box in my script import step.

       

      PS:

      - I am using FMP10 Advanced 10.0v3, on a local machine (no server, no sharing)

      - Windows 7

      - Experience: Advanced

        • 1. Re: XML Import issue related to XML files with one record only
          comment_1
            

          I've never noticed the greyed-out checkbox - but it must a purely cosmetic bug, since I experience no problems in importing a one-record XML.

           

          It wouldn't make any sense anyway: in a FMPXMLRESULT document, the first row cannot contain field names - they must be in the METADATA section. I'd suggest you look elsewhere.

          • 2. Re: XML Import issue related to XML files with one record only
            didier98004
              

            Thanks for your input.. Knowing that you were not seeing the "Don't import First record" checked,  I think I have identified the steps to repro the auto-check greyed out of this box

             

            - Create a script

            - add an Import Record line

            - Check Perform without dialog

            - Check specify import order (I used "Update matching records in found set" and "Add remaining data as new records". Click OK and check "perform auto-enter..." then Import.

             

            If you Specify Data Source, Select XML Data, Check "XSL Style sheet" and in File select your XSL, then select Calculation instead of File or HTTP Request in the upper part, than click OK, then if you go back to Specif Import order, You'll see that the "Don't import First Record" is checked and greyed out. No way to import single record file then...

             

            If you leave "Specify Data source" unchecked, or use the options other than calculation for the XML Data Source, the "Don't import first record" will remain unchecked.

             

            This is a bummer because using the calculation allowed me to let the user select the file to upload.

             

            • 3. Re: XML Import issue related to XML files with one record only
              comment_1
                 I am sorry if I wasn't clear enough: I do see the greyed-out checkbox, exactly as you describe. I just haven't noticed it until you mentioned it.
              • 4. Re: XML Import issue related to XML files with one record only
                didier98004
                   So you say you do manage to import XML file with only one record even if this "don't import first record" box is checked and greyed out on your side too. Thanks for the input, I will now investigate my xslt and other possible reasons for the import to not work then!
                • 5. Re: XML Import issue related to XML files with one record only
                  comment_1
                    

                  Didier Monin wrote:
                  So you say you do manage to import XML file with only one record even if this "don't import first record" box is checked and greyed out on your side too.

                  Precisely.

                   

                   

                  ---

                  I notice that earlier you said:


                  I used "Update matching records in found set"

                  This could be the real reason?