5 Replies Latest reply on Mar 22, 2015 8:56 AM by philmodjunk

    Multi-Table Export to Text File

    RichardHart

      Title

      Multi-Table Export to Text File

      Post

      I am unable to find a way to export the contents of all fields in all tables into a single text tile.
      You have a primary Table named CITY. Related to it are the Tables named HOTELS and RESTAURANTS. What you want is to export a text file something like this:

      Boston 
      Hotel 1
      Hotel 2
      Hotel 3
      Restaurant 1
      Restaurant 2

      Chicago
      Hotel 1
      Hotel 2
      Restaurant 1
      Restaurant 2
      Restaurant 3

      However, any kind of export gives you only the first hotel and the first restaurant. A Report does the same. Printing a list of portals to PDF doesn’t work. Any ideas short of a long string of scripts and export tables?

        • 1. Re: Multi-Table Export to Text File
          philmodjunk

          This should be possible though a plug in might be needed. It depends on your data model.

          A report can certainly reproduce what you show here if it's a list view summary report based on a table where Hotel1,2 3 and Restaurant 1, 2, 3 are all records in the same table--which may not match your actual data model.

          • 2. Re: Multi-Table Export to Text File
            RichardHart

            True, a Report can display this. However, a Report cannot generate a text file, and you cannot save or export a Report as a text file—only as a fully-formatted PDF (which includes graphics for the enclosing divs!).

            I will look for a plugin. Thanks.

            • 3. Re: Multi-Table Export to Text File
              philmodjunk

              You were the one who said " A Report does the same. " I was pointing out that this was definitely not the case for reports.

              But an export like you want may indeed be possible without use of a plug in. But again, this depends, on your data model.

              I'm pretty sure that you can get this result without a plug in, but those that allow you to append data to an existing file may make for a simpler solution.

              • 4. Re: Multi-Table Export to Text File
                RichardHart

                In the end, I created a new table (Export) with a field to contain each "summary" list. I wrote a script that looped through all the related records, one ID at a time, and populated each field in that new Export table with a return-delimited list of all contents of that field. That makes a File->Export a simple matter. The reason I posted here was to make I sure I wasn't reinventing the wheel—that there wasn't a built-in way to do this already. (I've confirmed that there is no such plugin, either.) Thanks for the help, Phil.

                • 5. Re: Multi-Table Export to Text File
                  philmodjunk

                  I have seen plug ins that allow you to append text to an existing file so I know they exist.

                  Your method is one of the options I had in mind as a way to do this.