1. Tony Fahlberg
  2. SnapObjects
  3. Wednesday, 4 March 2020 21:12 PM UTC

Hi - I was using the IDataStore.Evaluate method on an expression with a condition and it appears that the true and false conditions get evaluated before returning the correct value.  Is this expected behavior?

For example, the below generates an error with the Lower method (BUG 4137) if colInitials is NULL but since the condition was not met I did not expect the Lower method to be performed.

if(isnull(colInitials), \"\", Lower(colInitials))

 

Another example was where I used DwFunctionManager.AddGlobalFunction<TClass>() to inject a class which contains custom PB functions (static methods).  I am then using these functions in an expression when using IDataStore.Evaluate(). Placing breakpoints in these global functions I see that both the true and false conditions get evaluated before returning the correct value. 

If(colTest=\"Y\", myFxn1(colName), myFxn2(colName))

 

I could not determine if this also occurs with DWCompute since it does not have the same issue with NULL column values and currently cannot use custom functions (static methods).

Thoughts?

Thanks, Tony

 

Accepted Answer
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 March 2020 08:50 AM UTC
  2. SnapObjects
  3. # Permalink

Hi Tony,

Thank you for taking your personal time to test PB 2019 R2 Beta 2. There is a bug in IDataStore.Evaluate method (not DwCompute), and we are fixing it.

Kindly please report this bug via our support ticketing system to ensure it is being properly received by our tech support and tracked at https://www.appeon.com/standardsupport/

Regards, Logan

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.