cancel
Showing results for 
Search instead for 
Did you mean: 

setValueColumns for multiple Value Columns

Former Member
0 Kudos

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,

Accepted Solutions (0)

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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