cancel
Showing results for 
Search instead for 
Did you mean: 

Variables DataFilter is not working in RESTful API

Former Member
0 Kudos

Hi Experts,

I have a document that has multiple data providers (say, dataprovider1, dataprovider2, dataprovider3) which I merge them in to one (dataprovider merged).  Then I create a variable (dataprovider) in the variables folder.  When I process it in RESTful API by supplying the datafilter <datafilter><and><condition key="[dataprovider]" operator="Equal"><value>my value</value></condition></and></datafilter> using API http://host:port/biprws/raylight/v1/documents/<documentId>/reports/<reportId>/datafilter, but I get an error:

<error><error_code>WSR 00400</error_code> <message>The expression "[dataprovider]" can't be found in the document dictionary. Please enter another expression.</message></error>

Please help.  Most of all documents are like this.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

eric_festinger
Contributor
0 Kudos

hi

I don't understand "merging multiple data providers": could you please share your sequence of calls?

Thanks and regards,

eric

Former Member
0 Kudos

Hi Eric,

There is a webi report which is having multiple data providers in it and they mre merged with common dimensions.

eric_festinger
Contributor
0 Kudos

hi again,

So, these are "merged dimensions" (aka "links")

Could you please copy/paste the output of "GET .../raylight/v1/documents/{docId}/links"?

eric

Former Member
0 Kudos

The parameters return from the GET.../parameters is empty:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<parameters />

What I do is call a POST/PUT.../datafilter with the <datafilter><and><condition key="[dataprovider]" operator="Equal"><value>my value</value></condition></and></datafilter> which fails with an error:

<error><error_code>WSR 00400</error_code> <message>The expression "[dataprovider]" can't be found in the document dictionary. Please enter another expression.</message></error>


eric_festinger
Contributor
0 Kudos

hi

Rather than the output of 'GET .../parameters", I am much more interested in the output of "GET .../documents/{docId}/links", which lists all the merged dimensions of your document.

eric

Former Member
0 Kudos

The output of the GET.../docId/links shows as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<links>

<link qualification="Dimension" dataType="String">
<id>
L6

</id>

<name>Employee Merged

</name>

</link>

<link qualification="Dimension" dataType="String">

<id>
L2

</id>

<name>

Sales Person1 (AP)

</name>
</link>

<link qualification="Dimension" dataType="String">

<id>
L4

</id>

<name>

Sales Person1 (EMEA)

</name>
</link>

<link qualification="Dimension" dataType="String">

<id>
L5

</id>

<name>

Sales Person1 (Global)

</name>
</link>

<link qualification="Dimension" dataType="String">

<id>
L3

</id>

<name>

Sales Person1 (US)

</name>
</link>
</links>

The @Variable Employee I want to datafilter on is not found and throwing the error mentioned in earlier post.
former_member197386
Active Contributor
0 Kudos

Hi,

Maybe you're confusing with both concept "merged dimensions" (aka links) and "variables".

The call [GET] .../links will return only merged dimensions

whereas the call [GET] .../variables will return only defined variables

Hope this will help you!

Regards,

Anthony

Former Member
0 Kudos

Regardless of the two, if I want to filter using the variable defined in the @variable section, how would I achieve it?  I am always calling this from my code POST/PUT../docId/reportId/datafilter.

former_member197386
Active Contributor
0 Kudos

Yes, it should work so... Can you give me the version you're using please?

Copy/paste : /raylight/v1/about

I will run additional investigations.

Regards,

Anthony

Former Member
0 Kudos

../raylight/v1/about outputs the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<about>

<title>
Web Intelligence - Raylight

</title>

<version>

1.0

</version>

<vendor>

SAP SE

</vendor>

<build>

14.1.6.1702

</build>

<timestamp>

20150601.171324

</timestamp>

<copyright>

©2010 - 2015 SAP SE or an SAP affiliate company. All rights reserved.

</copyright>
</about>
Former Member
0 Kudos

Hi Anthony,

Wondering if you have a chance to look into why RESTful API throws that error when using datafilter on the user define variable in the Variables and not the dimension?

Thank you.

eric_festinger
Contributor
0 Kudos

hi

Does the variable appears in "GET .../documents/{documentId}/variables" call? If yes, would you mind showing the output of the call?

Thanks,

eric

Former Member
0 Kudos

Yes it does:

GET.../biprws/raylight/v1/documents/<documentId>/variables shows:

<variable qualification="Attribute" dataType="String">

<id>
L3fffffef

</id>

<name>

Employee

</name>

</variable>

eric_festinger
Contributor
0 Kudos

Good.

You should use this id as the key of your data filter.

eric

Former Member
0 Kudos

I use the name and it always give me error the expression not found in dictionary as stated above.

former_member197386
Active Contributor
0 Kudos

Please, could you try to follow Eric's advice (use the "id" instead of "name")?

Regards,

Anthony