简体   繁体   English

如何在同一转换中使用其他JavaScript中的一个JavaScript中的变量?

[英]how can I use the variables from one javascript in other javascript in the same transformation?

I am new at Pentaho Kettle. 我是Pentaho Kettle的新手。 Can someone tell me, how can I use the variables from one javascript in other javascript in the same transformation? 有人可以告诉我,如何在同一转换中使用另一个JavaScript中的一个JavaScript变量?

In first Java-Script I saved a date in a variable (var new_date) and in the second javascript-step I am trying to add a new column, where each cell will have a value of this variable (var new_date). 在第一个Java脚本中,我将日期保存在变量中(var new_date),在第二个javascript步骤中,我尝试添加新列,其中每个单元格都具有该变量的值(var new_date)。 But the variable is not defined. 但是没有定义变量。

Thank you for your help. 谢谢您的帮助。

At the bottom of your modified javascript step you can create stream fields to copy your values to. 在修改的javascript步骤的底部,您可以创建流字段以将值复制到其中。 Then call them in your next javascript steps as they're not part of the stream. 然后在您的下一个JavaScript步骤中调用它们,因为它们不属于流。 All you do is stick the variable name in the 'fieldname' box and rename it to whatever you want. 您要做的就是将变量名保留在“字段名”框中,然后将其重命名为所需的名称。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用JavaScript中另一个函数的变量 - How can I use variables from another function in javascript 如何将变量从Flex传递到JavaScript(单独的HTML文件)并返回其他变量? - How I can pass variables from Flex to JavaScript (separate HTML file) and return the other variables? 当我在 Javascript 中单击提交按钮时,我们如何从一个表中弹出元素并将相同的元素推送到另一个表中? - How we can pop element from one table and push the same element in other table when i click the submit button in Javascript? 如何使用另一个Javascript文件中的函数? - How can I use a function from one Javascript file in another? 将2个JavaScript变量的内容从一个交换到另一个 - Swap the contents of 2 JavaScript variables from one to the other 如何在其他函数的函数下使用javascript中定义的变量。 以下是我的确切Javascript代码 - How can I use variables defined in javascript under functions in other functions. below is my exact Javascript Code 我可以从两个页面将变量发送到相同的JavaScript吗? - Can I send variables to the same JavaScript from two pages? 如何在同一工厂的不同javascript函数中访问变量? - how can i access variables in different javascript functions on the same factory? 如何在Javascript中对多个变量执行相同的替换 - How can I do the same replace on multiple variables in Javascript 如何比较JavaScript中的2个变量以查看日期是否相同? - How can I compare the 2 variables in JavaScript to see if the dates are the same?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM