Home
Designing Analytics Reports
Determine the value of a parameter based on another parameter
Migrateduser
<p>Hello,</p>
<p> </p>
<p>I have a problem with determining the value of a parameter based on another parameter.</p>
<p> </p>
<p>The case is as follows:</p>
<p> </p>
<p>A parameter, let's say param1 is given in the URL (WebViewer). With that parameter I can fetch data from a REST API which is then stored in another parameter, param2 (String).</p>
<p>The fetched parameter (param2) contains information needed in subsequent API calls that are performed in different data sets of the report.</p>
<p> </p>
<p>The problem:</p>
<p> </p>
<p>My report has parameters, a cascading parameter group and a crosstab. I was able to fetch the information needed in the beforeOpen method of the data source where i would update param2 with the value I was able to get using param1. param2 was then used by the first parameter of the cascading parameter group and all was well. To my surprise the data source's beforeOpen was run again and param2 was reset and param1 is now useless as it can be used only once. This causes all the following API calls to fail.</p>
<p> </p>
<p>I have tried several methods (variables, appContext, different phases of execution) to keep param2 stored throughout the report execution but so far I've not managed to do so. My guess is that it has something to do with the context the report has at given points in execution. </p>
<p> </p>
<p>Is there a way to initialize a parameter based on another between the call to WebViewer and parameter window and make sure it doesn't get reset? Note that param1 and param2 are hidden from the user and they are only used to enable the API calls that the data sets use!</p>
<p> </p>
<p>Unfortunately I can't provide you with the report as it contains sensitive information.</p>
<p> </p>
<p>-ArK</p>
Find more posts tagged with
Comments
There are no comments yet