cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create a filter value from a URL command

Former Member
0 Likes
353

Hello all!

I would like to create a URL link to a specific query, with a filter value that will be transferred as a URL parameter.

I know that in older version I could have use this syntax –

FILTER_IOBJNM=0MATERIAL&FILTER_VALUE=1000040

But now on BI 7 it doesn't work.

What can I do?

Helpful answers will be rewarded.

Thank you!

Ron.

View Entire Topic
Former Member
0 Likes

Hi Rampel,

There is a more complex way to do it in BI 7.0. You need to build a command based on structure of xml.

You can find that information in some pdfs (Enterprise Reporting, Query and Analysis). Ill put the link in the next post. Still is kind of complicated.

What I did is javascript function that simplifies the url command u need to send. In this case the filter applies to all data providers (see "*"), if you just need to affect one data provider or alist then you can specify them in TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1, but you need to create a list.

Here an example code to generate que qstring to be sent:

syear = 2008;

smonth = "02";

qstring = location.href + "?TEMPLATE=ZGDRTP03C7";

qstring = qstring + GenerateEqualFilter(1,"0CALYEAR",syear);

qstring = qstring + GenerateEqualFilter(2,"0CALMONTH2",smonth);


function GenerateEqualFilter(command,char,value)
{

	 var qstring;
	qstring = "";
	if (value != -1)
	{
	  qstring = "&BI_COMMAND_"+ command + "-BI_COMMAND_TYPE=SET_SELECTION_STATE_SIMPLE&BI_COMMAND_" +command+"-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=*&BI_COMMAND_" +command+"-CHARACTERISTIC=@char&BI_COMMAND_" +command+"-RANGE_SELECTION_OPERATOR-EQUAL_SELECTION-MEMBER_NAME=@value";    

	  qstring =qstring.replace("@char",char);
	  qstring =qstring.replace("@value",value);

	}
	return qstring;
}