Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Java Script version 3 - Questions or bugs

  1. #1

    Exclamation Java Script version 3 - Questions or bugs

    Dear All,
    I don't really get all the changes that have been made in the Java Script Value since version 3.0.0

    1. Compatibility mode
    Some of my scripts don't work anymore.

    For example, create a simple Java Script Value Step into your transformation process:

    a)
    myStreamField.setValue('TEST')
    var idx = row.searchValueIndex('myStreamField')
    RESULT : myStreamField value != TEST

    b)
    myStreamField.setValue('TEST')
    //var idx = row.searchValueIndex('myStreamField')
    RESULT : myStreamField value = TEST

    What is happening?
    I use idx to know if the field exists in the row.

    2. No compatibility mode
    Is there somewhere a tutorial so i can write my script with no compatibility mode and be up to date?

    If no compatibility, then isNull or setNull for example generate error... . This functions are not recognized anymore in the update script step ?

    Thanks for your answers.
    At this moment I am still on version 2.5.2 in production environment.

    Aure

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Most of your questions are answered on http://wiki.pentaho.org/display/EAI/...2.5.x+to+3.0.0

    In short... in v3.0 the row contains the String/Double/... instead of Values

    Regards,
    Sven

  3. #3

    Default

    Thanks sboden.
    I will have to rewrite some scripts of the new mode.

    What about the problem 1. in compatibility mode?

    myStreamField.setValue('TEST')
    var idx = row.searchValueIndex('myStreamField')
    RESULT : myStreamField value != TEST

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    True about that last part... I create a JIRA for it http://jira.pentaho.org/browse/PDI-586

    Regards,
    Sven

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.