Ctools - cde dashboard - issue in parameter passing

745 views
Skip to first unread message

Ashwin

unread,
Sep 21, 2016, 10:55:58 AM9/21/16
to Pentaho Community

Hi Experts,

I'm trying to send two parameters from Dashboard 1 to dashboard 2, dashboards were created using Pentaho cde: 
'url'+'?Param1='+abc'&?Param2='+123

I'm trying to get the Parameters using two custom Parameters in using below functions for each within Javascript code:
Custom Parameter1:
Param1 = Dashboards.getQueryParameter("Param1");
Custom Parameter2:
Param2 = Dashboards.getQueryParameter("Param2");

But i'm able to get the values only for Param1 but not for Param2. Please suggest way to resolve the issue.

Thanks,

Benoit Hericher

unread,
Sep 23, 2016, 2:28:02 AM9/23/16
to Pentaho Community
Drop the '?' before Param2 in the ur l:

'url'+'?Param1='+abc'&?Param2='+123

this should be :

'url'+'?Param1='+abc'&Param2='+123



Benoit

Ashwin

unread,
Sep 23, 2016, 8:46:17 AM9/23/16
to Pentaho Community
I have tried dropping '?' before Param2 and sending the parameter. But still not able to receive Param2 at Dashboard2. Any changes required to be done at Dashboard 2 as well?

Benoit Hericher

unread,
Sep 23, 2016, 3:44:25 PM9/23/16
to Pentaho Community
Try to put the value (123) between quotes in the url . You will have to convert it back to integer in your dashboard2

Pedro Martins

unread,
Oct 3, 2016, 12:09:40 PM10/3/16
to pentaho-...@googlegroups.com
Is this using CTools?
In CTools, parameters are encapsulated in the URL inside a stringfied JSON. If you don't know how it looks like, I'd suggest you create a CDE dashboard with a couple of parameters, set some default values over there and make sure to tick the property "bookmarkable". Once you start using the dashboard, if you change the parameters, the JSON line with the parameters will show up in the URL if at least one of them is not using it's default value.

That should be what you need.. if I got your question right

Cheers,
Pedro Martins

On 23 September 2016 at 20:44, Benoit Hericher <heriche...@orange.fr> wrote:
Try to put the value (123) between quotes in the url . You will have to convert it back to integer in your dashboard2

--
You received this message because you are subscribed to the Google Groups "Pentaho Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pentaho-community+unsubscribe@googlegroups.com.
To post to this group, send email to pentaho-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pentaho-community/41e2a602-c8ac-451e-b67f-733e7a5c84e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pedro Martins
Webdetails Implementation Lead

http://www.webdetails.pt

Ashwin

unread,
Oct 4, 2016, 2:25:45 AM10/4/16
to Pentaho Community
Thanks a lot Benoit and Pedro for your valuable inputs. I got the solution, changed the parameter to 'Custom Parameter' in source dashboard as well and added code to post the parameter in java script code 


On Wednesday, 21 September 2016 20:25:58 UTC+5:30, Ashwin wrote:
Reply all
Reply to author
Forward
0 new messages