Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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.

Capture 1.JPG

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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us