Hi
Is it possible to set the queryname in the dataprovider using javascript.
My scenario is that I want to fetch the queryname from the URL with the following javascript
I have the script:
function GetPara( name )
{
name = name.replace(/[\[]/,"
\[").replace(/[\]]/,"
\]");
var regexS = "[
?&]"name"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
And then I want to implement something like the following in the template
//First dataprovider (TAB_A_DP) initialization
<bi:QUERY_VIEW_DATA_PROVIDER name="TAB_A_DP" >
<bi:INITIAL_STATE type="CHOICE" value="QUERY" >
<bi:QUERY value="SCRIPT_FUNCTION">
<bi:SCRIPT_FUNCTION value="GetPara('TAB1')" />
</bi:QUERY>
</bi:INITIAL_STATE>
</bi:QUERY_VIEW_DATA_PROVIDER>
//SEcond dataprovider (TAB_B_DP) initialization
<bi:QUERY_VIEW_DATA_PROVIDER name="TAB_B_DP" >
<bi:INITIAL_STATE type="CHOICE" value="QUERY" >
<bi:QUERY value="SCRIPT_FUNCTION">
<bi:SCRIPT_FUNCTION value="GetPara('TAB2')" />
</bi:QUERY>
</bi:INITIAL_STATE>
</bi:QUERY_VIEW_DATA_PROVIDER>