accessing helpkey or how do I confirm a report is a certain platform?
Jan 20, 2017 7:37 AM(2031 views)
Can you access the Helpkey value of a report? I want to confirm that a report is a certain platform, say bivariate, and the Helpkey seems to have the information I want if the title is changed. If I can not use the helpkey, is there another way to confirm this? The only way I can figure out is verifying there are 2 continuous axes.
Maybe a different approach would work. This script looks through all the open windows to find reports and displays their scripts. The script tells how to recreate the report and probably also has the information you need.
// get a list of open windows
wlist = Window();
// some of them might be platforms
For( i = 1, i <= N Items( wlist ), i += 1,
ob = Try( wlist[i][Outline Box( 1 )] );
// see if there is an outline box
If( Type( ob ) == "DisplayBox",
// the outline box might be a platform owner,
// see if it is a scriptable object
platform = ob << getscriptableObject;
If( Type( platform ) == "Scriptable",
// found one. display its script
Show( platform << getscript );
s = platform << getscript;
If( Head( s ) == Expr( distribution() ),
Head( Arg( s, 1 ) ) ==
Expr( ContinuousDistribution ),
Print( "ok" );//
Print( "no" );//
Print( "not close" )
The script is returned as an expression; you can either use the expression functions to study it or convert it to a string with char() and use character functions to study it.
c = char(NameExpr(s)); // convert to character
"Distribution(Continuous Distribution(Column(:weight)), Nominal Distribution(Column(:age)))"
contains(c,"Nominal Distribution") // find location of text