Support Article
Declare expressions do not work as expected
SA-16471
Summary
Below Declare Expression sets EligibleForRemittance to False when if IsAddedOnRemittanceDay evaulates to True, and True when if IsAddedOnRemittanceDay evaluates to False.
Both IsAddedOnRemittanceDay and EligibleForRemittance are properties of type TrueFalse.
Error Messages
Not Applicable
Steps to Reproduce
Create a Declare Expression as described in the summary and test.
Root Cause
Given use case is a wrong usage of the function alias "pyCollectionEvalReturnBoolean" (Return value is [True / False]). This function alias compares the values selected in dropdown with the value in parameter "pxReturnValue". When both match- it returns true, when they do not match- it returns false. Since this is a declare expression, the context would not have parameter "pxReturnValue" set in it. Therefore, the R-U-F would not work as expected and would always return True instead of False and vice-versa.
Resolution
Change the function alias from Return value is [True / False] to [expression evaluates to true].
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.