Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: str2num javascript function

  1. #1
    Join Date
    Jan 2007
    Posts
    29

    Unhappy str2num javascript function

    Dear All,

    I have problems with the str2num function, when I try to use it, an error message indicates that undefined is not a function.

    Here is a piece of code that I use:

    var strArray = completeFileName.getString().split("\\\\");
    var filename = strArray[strArray.length-1];
    var bc = filename.Clone().substr(4,2).str2num();

    Best Regards,


    Taufik

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    filename is just a String, not a Value object.
    Please note that you can use the normal functions in the modified JavaScript step for this.
    There is no need to clone anymore either.

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.