Skip to Content
author's profile photo Former Member
Former Member

Unable to get the data of selected Item from a listbox

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 ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 22, 2016 at 08:50 AM

    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.


    Deepak Raj.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.