Page 1 of 1

Accessing Packages without changing Scope

PostPosted: Thu Jun 04, 2020 6:30 pm
by lamarts@san.rr.com
I have a list of packages each containing a table to be part of a report template.

I have scripts for each table and they work when I set the scope to the specific "table package" when generating the report.
See attachment

When I generate the report, I want the parent package as the scope and to access to the specific "table package" in my script.

I tried:
#foreach($p in $Package)
#if($p.name == "Table 1")
#foreach($c in $Class)
$c.name
#end
#end
#end

I get all of the class elements in all of the Tables. I only want to work on a specific package. any ideas?
Thanks

Re: Accessing Packages without changing Scope

PostPosted: Fri Jun 05, 2020 8:49 am
by lamarts@san.rr.com
ok...got some help...
#foreach($c in $Class) will return everything in the scope package in lieu of the specific package.

back to the drawing board. :(

Re: Accessing Packages without changing Scope

PostPosted: Fri Feb 26, 2021 9:35 am
by beckieholzer@gmail.com
Late reply but in case anyone else comes across this and needs the code:

#set($ApplicableDocumentsTableName = “TBX Log”)
#foreach($diagram in $sorter.humanSort($Diagram))
#if($diagram.diagramType == “Generic Table”)
#set($ApplicableDocumentsTableName = $diagram.name)
#if($ApplicableDocumentsTableName.contains("TBX Log"))
#createTable($diagram)
#end#end#end

will return an instance of a table named TBX Log (of type Generic Table).