Hi everyone,
I have two combo boxes, a listbox and a search button into my dashboard. Two combo box contains : Years, Months and listbox contains: Submeter lists.
While I pressed on the Search button, it will show me a chart into the dashboard based on my selection. Instead of listbox, I am able to show the chart into dashboard(using single selection: Year, Month, Submeter) using Search button.
My requirement is to select a year, month from combobox but two submeters from the listbox.
I am retrieving data from SAP HANA using xso data service, converting itself into a json model and added combobox and listbox variables using getSelectedKey():
var strUrl="http://<host ip>/workshop/sessiona/aa/services/monthly_historical.xsodata/MONTH?$filter=substringof(%27"+Year .getSelectedKey()+"%27,%20YEAR)%20and%20substringof(%27"+Month.getSelectedKey()+"%27,%20MONTH1)%20and%20%20SUBMETER%20eq%20"+Submeter .getSelectedKey()+"&$format=json";
How could it will be possible to store multiple values into a variable(Submeter) when user will choose n no of submeters ?
Hi Sandip,
to store multiple values to a single variable,
You need to define the variable as array then it is possible to store the multiple values.
for example if you define
var submeter = [ ] //empty array
Then you need to pass the values to the array which you selected from the combobox.
Thanks,
Deepak Raj.
Add a comment