Export OutlineLevel "1" data


#1

What is the best way or preferred method to export only the summary records (OutlineLevel “1”) and import those summary records into another table?


#2

The menu item Field > Analyze > Summary Table & Chart….
Once you have set up your summary, you can there use the menu command Summary > Make New Database with Summary Data .


#3

Is there a equivalent procedural statement that will do this?


#4

You could do something like this.

local theData
theData = arraybuild(cr(),"","exportline()",{info("summary")=1})
openfile "The Other Database"
importtext theData

Substitute the actual name of your other database. If you want the import to replace the existing data in your other database, the last line should be.

importtext theData, "ExistingData", "Replace"

#5

If you’ve used the outlinelevel statement, you can just export the data directly from the original database. Only visible records are exported, so if only summary records are visible, that’s what will be exported. You can use the export statement, or the arrayselectedbuild statement.

With Panorama X 10.2 you can also skip the whole “group, total outlinelevel” steps and generate the summary information directly using the summarytable( function. This is the function that the Summary Workshop uses. Then you can use the importtext statement to bring the data into another database. In fact, I think you could actually do the whole thing in one line of code.


#6

The Summary Table function looks super interesting, but in the essence of time I used Jim’s suggestion of an ArraySelectedBuild to grab the data followed by and ImportText statement to import the data perfectly into a separate database. That did the job. Very slick. Thank you.