1 2 Previous Next 16 Replies Latest reply on Feb 4, 2016 8:28 AM by beverly

    Exporting Issues

    Shoreline

      Hi,

       

      I have to export data to be imported into another system. The data needs to be in .txt format.

       

      The data needs to look as follows.

       

      "LIT009FTP","54gfs655","991496","F","1","1"

      "1086","2016/02/01"

      "1002","228 Photography","228 Photography","1","19044200","1089875185","65000","65000","","","0","0","0","0","0","19314","","",""

      "1001","25 Weddings","25 Weddings","1","200912","62508587667","25000","25000","","","0","0","0","0","0","19315","","",""

      "1003","Aartsappel","Tanya Buys","2","632005","9264792488","30000","30000","","","0","0","0","0","0","19316","","",""

       

      I'm currently exporting as as .tab and on a windows pc opening it with notepad and saving it as .txt

      When the same process is done on a Mac it changes the data to the following:

       

      """LIT009FTP"",""54gfs655"",""991496"",""F"",""1"",""1"""

      """1085"",""2016/02/01"""

      """1002"",""228 Photography"",""228 Photography"",""1"",""19044200"",""1089875185"",""65000"",""65000"","""","""",""0"",""0"",""0"",""0"",""0"",""19041"","""","""","""""

      """1001"",""25 Weddings"",""25 Weddings"",""1"",""200912"",""62508587667"",""25000"",""25000"","""","""",""0"",""0"",""0"",""0"",""0"",""19042"","""","""","""""

      """1003"",""Aartsappel"",""Tanya Buys"",""2"",""632005"",""9264792488"",""30000"",""30000"","""","""",""0"",""0"",""0"",""0"",""0"",""19043"","""","""","""""

       

      What do i need to do for it to stay same as first set of data? I even tried removing the "" quotation marks but then it enters then in the wrong places.

       

      Can someone please assist.

        • 1. Re: Exporting Issues
          user19752

          Do you really exported using .tab?

          The result seems using .csv

          • 2. Re: Exporting Issues
            Shoreline

            When i export to .tab it gives me the following:

             

            NEA59128,"95NhL72","783030","B","1","1"
            1075,"2016/01/15"
            1006,"Ain't It Grand","Aint it Grand","1","250655","62082360042","30000","30000","","","0","0","0","0","0","16086","","",""
            1028,"Beauty 4 You","Beau-ternity and healt","1","251545","62084491746","25000","25000","","","0","0","0","0","0","16087","","",""
            1043,"Blue Bird Decor Cafe","Blue Bird Decor","1","251945","62500714234","37500","37500","","","0","0","0","0","0","16088","","",""

             

            Then when i open it using Note Pad it looks like following which is correct:

             

            "NEA59128","95NhL72","783030","B","1","1"

            "1075","2016/01/15"

            "1006","Ain't It Grand","Aint it Grand","1","250655","62082360042","30000","30000","","","0","0","0","0","0","16086","","",""

            "1028","Beauty 4 You","Beau-ternity and healt","1","251545","62084491746","25000","25000","","","0","0","0","0","0","16087","","",""

            "1043","Blue Bird Decor Cafe","Blue Bird Decor","1","251945","62500714234","37500","37500","","","0","0","0","0","0","16088","","",""

            • 3. Re: Exporting Issues
              Mike_Mitchell

              I suggest you build the entire export into a single global text field via script first, then export that global field from a single record. That way, it's just one big block of text and no after-the-fact manipulations are required.

              • 4. Re: Exporting Issues
                beverly

                Mike, there may be a problem (unconfirmed by me) on Windows with the end-of-line duplicating when a single field is created this way and exported.

                What I cannot confirm: is FileMaker adding characters (which make the text appear to be double spaced), or is the Windows text editor (NotePad, NotePad+) adding these? I don't have any means to test, if others can confirm.

                 

                I think we need to see script and/or dialog screen shots from Shoreline to confirm issues on exporting, and possible solutions.

                beverly

                • 5. Re: Exporting Issues
                  Mike_Mitchell

                  I haven't seen that. Which version of Windows / FileMaker?

                  • 6. Re: Exporting Issues
                    beverly

                    Mike, try this thread (the export with XML/XSLT is not the concern, as this seems to happen with other exports):

                     

                    Onefield export XSLT skips lines

                     

                    and there were other threads on this. There may even be a Product Issue on it. I can't confirm.

                    beverly

                    • 7. Re: Exporting Issues
                      Shoreline

                      Hi Mike,

                       

                      The data is already in one field before exporting. See calculation below.

                       

                      Char(34) & ${DDI:Customers}::__pk_Customer_id & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Customer_Name & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Bank_Acc_Name & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Account_Type & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Branch_Code & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Account_No & Char(34) & "," &

                      Char(34) & $Amount & Char(34) & "," &

                      Char(34) & $Amount & Char(34) & "," &

                      Char(34) & ${DDI:Customers}::Email_Addess & Char(34) & "," &

                      Char(34) & Char(34) & "," &

                      Char(34) & "0" & Char(34) & "," &

                      Char(34) & "0" & Char(34) & "," &

                      Char(34) & "0" & Char(34) & "," &

                      Char(34) & "0" & Char(34) & "," &

                      Char(34) & "0" & Char(34) & "," &

                      Char(34) & Debit_Order_Items::__pk_DDI_id & Char(34) & "," &

                      Char(34)  & Char(34) & "," &

                      Char(34)  & Char(34) & "," &

                      Char(34)  & Char(34)

                       

                      There isn't a problem with exporting from Windows, it works fine. It's when exporting with a Mac that i have an issue.

                      • 8. Re: Exporting Issues
                        Shoreline

                        This is my script for creating the data before exporting.

                         

                        Create DD.JPG

                        This is my export script.

                        Export DD.JPG

                        If there is an easier or better way of exporting to get my data into .txt format i would really appreciate any advice.

                        • 9. Re: Exporting Issues
                          user19752

                          Your export script don't have file name in it but "No dialog".

                          Did you correctly select the file type as ".tab" and type the filename as "yourname.txt" ?

                          I forgot but typing filename can cause changing file type or visa verse, check it before go.

                          • 10. Re: Exporting Issues
                            Shoreline

                            Hi,

                            Yes that is exactly what I'm doing. I have asked my client to confirm that that's what they are doing.

                            Unfortunately it's difficult for me to test as i only have a windows pc and my clients only have mac.

                            • 11. Re: Exporting Issues
                              Mike_Mitchell

                              Is there a reason you’re using Char ( 34 ) instead of just escaping a quote? The Mac might be interpreting that as a “smart” quote instead of a normal double-quote character.

                              • 12. Re: Exporting Issues
                                beverly

                                Char (34) is the non-curly double-quote and would not be interpreted as anything else.

                                However I might use:

                                 

                                Quote( $mVar ) & "," & ....

                                beverly

                                • 13. Re: Exporting Issues
                                  beverly

                                  I think you are on to something, user19752. I'm wondering if the user is creating the name or if it's set by Variable and then the Variable is in the dialog.

                                   

                                  Mac does have a problem with the user changing the extension manually. However, when FMP set's the name and extension, it seems ok.

                                   

                                  beverly

                                  • 14. Re: Exporting Issues
                                    Shoreline

                                    I wasn't sure how to get the data like that and another user suggested using Char(34) and it worked.

                                    Beverly i see you commented on my previous question as well.

                                    I will change it from Char(34) and rather use Quote() and let you know if it's working.

                                    Thanks! 

                                    1 2 Previous Next