Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: LibFormulaErrorValue, errorCode: 0, errorMessage: Unexpected

  1. #1
    Join Date
    Dec 2016
    Posts
    19

    Default LibFormulaErrorValue, errorCode: 0, errorMessage: Unexpected

    Hi,

    I just wanted to post here an error that I came across and could successfully solve.

    When using the Formula step, in Spoon 6.1.0.1-196, i got the following error:

    Error calculate formula. Formula IF (.....))))) output field: NovaSituacao, error is: LibFormulaErrorValue{errorCode=0, errorMessage=Unexpected}
    I've ommited the formula itself because it is too long. After trying a few modifications in my formula, I found the problem: there was a call to the logical AND function as the following:

    Code:
    AND([Days] > -[CalculatedDays]; [Days] <= 0)
    I solved the problem by adding a ZERO before the minus operator.
    So, after that modification I got:

    Code:
    AND([Days] > 0 - [CalculatedDays]; [Days] <= 0)
    and the LibFormulaErrorValue was gone.
    I hope it may help someone to "escape" from this error as well, at least for this situation.

    PS: Do you guys think I should open an Issue on Pentaho JIRA for this?

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Nice to see someone registering with this forum only to share a solution.

    You know there's an integrated help provided by the Formula step?
    If you select the minus sign from "Basic computations" it says "Subtract 2 numeric values" - and that's it.
    While you can have negative numeric literals, you can't have a minus sign with a field reference.
    Your "solution" is the right way to do it.
    No need for a Jira case IMO.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2016
    Posts
    19

    Default

    Thank for the reply marabu, you are absolutely right!

    I just read the explanation for the minus operator in the integrated help. It actually leaves no doubt, it is very well documented.

    I too agree there's no need to open an issue on JIRA.

    Thanks again for the reply!

  4. #4
    Join Date
    May 2016
    Posts
    1

    Default Thank you!

    Quote Originally Posted by amaralbf View Post

    Hi,

    I just wanted to post here an error that I came across and could successfully solve.
    I hope it may help someone to "escape" from this error as well, at least for this situation.
    You just saved me from a situation where I got this error in a spot where time is of the essence, and I am really grateful that you posted this. Hope the good you did will be returned one day!

    - Asparuh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.