List box control not clearing values when SMO returns 0 items

  • 24 February 2022
  • 0 replies
  • 2 views

Userlevel 5
Badge +20
 

List box control not clearing values when SMO returns 0 items

KBS100045

PRODUCT
K2 blackpearl 4.6.11
BASED ON
K2 blackpearl 4.6.11
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.

Issue

There is a list box that is bounded to a SMO. This list box is working as expected until the SMO does not return any value. When the SMO does not return any value, the expectation is that the list box will be empty, however it keeps the last known value. ie. it never gets cleared when there are no value in SMO. 

The issue encountered is similar to the following post: http://community.k2.com/t5/K2-blackpearl/How-to-Clear-a-List-Box-Control/ta-p/83908

 

Symptoms

We have a list box control that is bounded to a SmartObject.

 

This list box is working as expected until the SmartObject does not return any value.

 

When the SmartObject does not return any value, the expectation is that the list box will be empty, however it keeps the last known value. ie. it never gets cleared when there are no value in the SmartObject.

Troubleshooting Steps

To resolve this please complete the following Workaround:
 

1) Create an empty entry
2) Filter this entry on the Input mappings of the View initialize
3) Call two rules to populate the controls:

1) Show blank entry
2) Filter on input mapping (if input mapping is empty then the blank entry is shown).


0 replies

Be the first to reply!

Reply