on 03-08-2012 7:47 PM
Hi,
I try to build a dynamical query dashboard in which I need to display two value columns based on a web page input. I succeeded doing one column, but when I try to put in a list i get a web page error. What is the syntax to use when using setValueColumns for more than one column?
example with one column:
var SelectedProductivity = document.getElementById('Selectbox1').value;
var SelectedTransport = document.getElementById('Selectbox2').value;
document.Excel_Example.getChartObject().setValueColumns(SelectedProductivity" (1987=100) "SelectedTransport);
when I want to add an additonal reference column, I get a page error (both are columns in my SQL Query, which work seperately:
var SelectedProductivity = document.getElementById('Selectbox1').value;
var SelectedTransport = document.getElementById('Selectbox2').value;
document.Excel_Example.getChartObject().setValueColumns(SelectedProductivity" (1987=100) "SelectedTransport,"Reference");
Does someone knows the solution for this, as I couldn't find any example searching sdn and the sap help
kind regards,
Build a test display template, that uses the 2 or more ValueColumns from your existing query template. Then observe the visible column names - you have strange characters which appear to be the problem. If you save and then export your test display template you can open it with notepad and see the proper format for your javascript.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Problem fixed. Seems like I had to put the column seperating comma within double quotes too
document.Excel_Example.getChartObject().setValueColumns(SelectedProductivity+" (1987=100) "+SelectedTransport+",Reference");
Thanks
Edited by: Bram Scheers on Mar 9, 2012 11:17 AM
Edited by: Bram Scheers on Mar 9, 2012 11:19 AM
Edited by: Bram Scheers on Mar 9, 2012 11:19 AM
User | Count |
---|---|
11 | |
6 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.