tablePane with OnCreateResultSet returns no results when referencing other namespace
Hi
I have a Zen Page with tablepane which has a datasource in a different namespace to that of the Zen Page. When the page is run, no data is returned and the tablepane is not populate, even though the rerferenced table contains dat.
The tablePane code is as follows:
<tablePane id="DataExtractionCurrent"
showZebra="true"
cellSpacing="2px"
OnCreateResultSet="DataExtractionCurrent">
</tablePane>
The OnCreateResultSet points to the following method:
Method DataExtractionCurrent(Output tSC As %Status, pInfo As %ZEN.Auxiliary.QueryInfo) As %ResultSet [ ZenMethod ]
{
new $namespace
set $namespace = "DATAEXTRACTION"
#dim result as %ResultSet
Set result=##class(%ResultSet).%New("%DynamicQuery:SQL")
Set tSC=result.Prepare("SELECT * from FairWarning_Table_Local.Logs")
w !, tSC // value of 1
quit result
}
Basically, the tablepane is not populated with data from the referenced table, which does contain data. However, it is picking up the column names and correctly displaying them in the table pane. Outputting tSC produces a value of 1.
I know the basic code does work, as changing it to reference a table in the same namespace as the current zen page returns resuls and populates the tablepane.
Any suggestions?
Cheers