'how to using parameter in modified java pentaho

my boss wants to send email every morning with filename+date(yyyymmdd) i've used "get file names" in the folder. the problem is, the filename in "get file name" is only direct for example 'sales comparation.xlsx' but what we want is filename+date(yyyymmdd) to be 'sales comparison (20220701).xlsx. I have prepared a parameter/variable that reads date(yyyymmdd), and added a "Modified Java Script Value" design so that the file is dynamically changed to the desired one.

I couldn't find on the forum what I was hoping for. can anyone help please send a kettle or a photo for easy understanding.

best regards

enter image description here

enter image description here

enter image description here



Solution 1:[1]

I think some ways to solve ur problem, i guess.

1.- Using "Join rows (cartesian product)" in the transformation where u get file name. join rows, after thar concat values with Mod JS or concat fields.

2.- If u use "Set Variable" u should use "Get variable" like this:

Set Variables

Get Variables

Also u should declare in Transformation properties

Transf Prop

3.- Using parameters i did with "Copy rows to result", u should declare parameters in "Transformation" job entry configuration "parameters" like this:

Transformation configuration

Variables and parameters are diferent things.

Edit about comment:

sent values for parameters and variables

Set variable config

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1