How to apply filtering to Editable List Views when a Single drop-down list changes

  • 24 February 2022
  • 0 replies
  • 140 views

Userlevel 5
Badge +20
 

How to apply filtering to Editable List Views when a Single drop-down list changes

KBS100110

PRODUCT
K2 blackpearl 4.7
BASED ON
K2 blackpearl 4.7
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Objective

I have 3 drop-down list controls, when I click on these drop-down list values I need to filter only the selected value and display it in an editable list view. If the second control is changed and contains a selected value, the first filtering should disappear and be replaced with the new selected values filtering.

Before You Begin

Configuring your filter based on when one of the drop-down lists had changed will result in the filter being applied to the editable list view every time one of the drop-down lists have changed. This means that if you select a value in the first drop-down, the filter will execute and filter based on that value. However, if you then select a value in the second drop-down the filtering for the first drop-down selection will be lost and the editable list will then filter based on the second drop-down selection.

How-to Steps

1. Create a SmartObject and add three different Properties to it. In this scenario the following was used:

  • Name (Text)
  • Surname (Text)
  • Age (Number)
SmartObject.png

2. Create an Editable List View from the SmartObject and ensure that this SmartObject is the Editable Lists' Data Source.

EditableListDataSource.png

3. Edit the Editable List and add three drop-down list controls.

4. On each drop-down lists' "Change Event" execute the Editable List views GetList method using the rule called "Execute a method on the view" and configure each to filter based on the values the drop-down list contains.

For example: Filter, drop-down Name with the Name value from the SmartObject connected to the drop-down list.


0 replies

Be the first to reply!

Reply