Problems with the Round function

7 posts, 0 answers
  1. Sandy
    Sandy avatar
    2 posts
    Member since:
    Jan 2019

    Posted 31 Jan Link to this post

    A company that I consult for has an application that uses the expression editor.  A configuration box that uses the expression editor has a calculation that used to work but no longer does.  It appears that the Round function has changed to not allow parenthesis within it's own.  Can someone explain if there has been a recent change in R1 2019 that might explain this?
  2. Jesse
    Jesse avatar
    2 posts
    Member since:
    Nov 2015

    Posted 04 Feb in reply to Sandy Link to this post

    Other functions have this issue as well for example, the Abs function:

    Works: Abs(1*2+2)

    Doesn't work:  Abs(1*(2+2))

    The expression editor flags this as an error.

    This worked in an older version of the Telerik UI for WPF demo software. After downloading the latest version (R1 2019), it no longer works???

  3. Ivan Petrov
    Admin
    Ivan Petrov avatar
    708 posts

    Posted 05 Feb Link to this post

    Hi Sandy and Jesse,

    Thank you for bringing our attention to this issue.

    We made some significant improvements to the expression parser engine in our last release (R1 2019) and it seems this case has been missed in our tests. I have logged a feedback item which you can track to get a notification when a fix will be available. Due to the implementation of the parser, I am not able to provide you with a workaround. I have prepared a fix candidate and will test it in the coming days. The fix should be available in the next internal build or the next service pack the latest. 

    If you have further input into this issue, do not hesitate to write back.

    Regards,
    Ivan Petrov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Sandy
    Sandy avatar
    2 posts
    Member since:
    Jan 2019

    Posted 05 Feb in reply to Ivan Petrov Link to this post

    I believe the problem also exists in the IF() function too.  It seems as almost no functions allow parenthesis within parenthesis.  The statement IF((A<1) OR (A>5),1,0) used to work and now does not.  Fortunately I was able to remove the inner parenthesis and have it work, although it is more difficult to read.
  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    708 posts

    Posted 05 Feb Link to this post

    Hi Sandy,

    Thank you for adding to the case.

    Indeed, the problem is with parentheses inside of a method's arguments. I am adding this case to the list of scenarios I will test the fix candidate against. 

    Your help in this is really appreciated so anything else that comes up, do not hesitate to throw my way.

    Regards,
    Ivan Petrov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Jesse
    Jesse avatar
    2 posts
    Member since:
    Nov 2015

    Posted 05 Feb in reply to Ivan Petrov Link to this post

    Hi Ivan,

    There also appears to be an issue with the way the "IF" function is added to the editor's text box when the function name is double-clicked. If you click on the IF function, the description below shows "Condition" instead of "IF" and if you double-click to add the function to add it to the expression the function that gets added is "Condition", which is invalid. The function should be IF, which works. Please see the attached screenshot from the R1 2019 WPF demo.

  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    708 posts

    Posted 06 Feb Link to this post

    Hello Jesse,

    Thank you for your input into this thread.

    I was able to reproduce the behaviour you have described and found the cause of it. We mask the LabdaExpression.Condition with the IF operator so it would be easier for end users to recognize its intended use. In the case of the double click we use the actual function name instead of the alias. I have submitted a fix for our QAs to test and it should make its way into our next internal build.

    I have also updated both yours and Sandy's Telerik Points for your feedback and help.

    As before if anything comes up, let us know.

    Regards,
    Ivan Petrov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top