KB-1365 Cannot use empty array in difference()

Symptoms

When applying the difference() function on an empty array, such as the following:

=difference ({1,2,3,{},4},{})

the following error occurs:

Expression evaluation error at function 'difference': Invalid types, can only act on data of the same type (Number (Integer), Any Type)

Cause

This issue has been reported to the Appian product team. The reference number for this issue is AN-69761.

Action

As a workaround, place a check prior to the difference() function in order to avoid evaluating empty arrays.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: May 2017

Related
Recommended