cancel
Showing results for 
Search instead for 
Did you mean: 

How to model dropdown list for filtering table?

Former Member
0 Kudos

Hello,

I have a webservice which provides me with a number of objects. Among others, each object carries an attribute "category".

I want to display the list of objects in a table. I want be able to filter the displayed objects according to their category. I want be able to choose the to be displayed category at runtime by selecting a category from a dropdown list.

Unfortunately, I have no idea of how to model this.

Is that possible at all? How can I do that? Anyway, I want to avoid calling the web service more than once!

Best regards

Alexander

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can model this.

I have created a sample model that shows how this works. In model I used a list filtered by color.

In order to do this you will need to use a Data Share that will hold the data returned by the service (so the service will not be called over and over again).

the Data Share will be connected to a filter and the filter will be connected to the table.

The filtering criteria will be dependent on a field in the model (in my model it is a drop down in the form "input".

In the form "input" there is a drop down which holds the list of colors.

the drop down also has an action called "filter_table". note that the line connecting the Data Share to the filter is triggered by the event "filter_table" meaning each time this event is triggered data will flow from the Data Share to the filter. Note the "" prefix to the action.

Here are some screen shots that may help understand the model:

[the model|http://img88.imageshack.us/my.php?image=modelrt5.png]

[action on drop down|http://img401.imageshack.us/my.php?image=dropdownactionqh8.png]

[filter configuration|http://img509.imageshack.us/my.php?image=filteruz7.png]

Former Member
0 Kudos

Hi Shai,

You can model this.

I have created a sample model that shows how this works. In model I used a list filtered by color.

Thank you very much for your detailed explanation. That works fine.

Best regards

Alexander

Answers (1)

Answers (1)

Former Member
0 Kudos

you may also use the ALV filtering functionality which is available in any table.

All you need to do is click the filter button in the upper right corner of the table, and add your filtering criteria in the filter line that appears.

See attached screen shots:

[Filter Button|http://img516.imageshack.us/my.php?image=filterbuttoncy7.png

]

[Filter Line|http://img505.imageshack.us/my.php?image=filterlineal0.png]

Regards,

Shai

Former Member
0 Kudos

you may also use the ALV filtering functionality which is available in any table

I am aware of this but it is a very inconvenient possibility.

Best regards

Alexander