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.

Objective

When using a SmartForms advanced condition within a 'For each item in a List view' loop to target only certain rows within a List View, the 'Is Empty' operator works with a 'Text' SmartObject property, but does not work with a 'Number' property.

Image


Number property does not work.

Image

Text property does work.

Before You Begin

The "For each item in a List view" implementation is similar to the post below; however an advanced condition is used to target only certain rows of the list view:

http://community.k2.com/t5/K2-blackpearl/For-Each-Loop-of-Rows-in-a-List-View/td-p/85122

How-to Steps

Implementation A:

1. If this 'Number' SmartObject property does not and will not contain '0' in the rows returned; the advanced condition of if 'Number' Property Equals 0 can be used to check for blank/empty/null values.

Image

Implementation B:

1. If this 'Number' SmartObject property does or will contain '0' in the rows returned; a hidden data label with an expression 'Text > Is Blank([SmartObjectNumberProperty])' can be used to check for blank/empty/null values.

Image

Image

2. If it is blank/empty/null, this expression will return 'true'; as such during the configuration of the advanced condition, can be configured such that [IsEmptyCheck] Equals 'true'.

Image