AnsweredAssumed Answered

How to perform secondary relational lookups when exporting portal data?

Question asked by tkessler45 on Mar 15, 2016
Latest reply on Mar 17, 2016 by beverly

I have a layout that contains a Reports table in a portal. This Reports table includes additional unique IDs, such as the following:

 

Report IDRegions::IDName
12Name 1
21Name 2

 

For the Region IDs, I have an additional "Regions" table that list the IDs and corresponding values (names):

 

Region IDRegionName
1MyRegion
2YourRegion
3TheirRegion

 

The Reports table (top one) is viewed as a portal from another layout that provides controls for filtering the portal data. I would like to export the report table as seen in the portal (ie, filtered, sorted, etc.) to a CSV file, such that the CSV includes looked-up features like the following:

 

Report IDRegions::IDName
1YourRegionName 1
2MyRegionName 2

 

When using exporting options, I get the top-most table as the output (ie, with Region ID number values) instead of the bottom one with corresponding names. Is it possible to create an export routine that does this lookup and generates the CSV with the text names instead of the ID data that is in the table? I could do this with SQL queries, but the ExecuteSQL option doesn't appear to work on local tables, and only does so on external ODBC data sources.

Outcomes