Using "First value of column" for file path when exporting - how can we use it?

Hello,

When using “First value of column” for example to import a file, it works fine, as I can define the path I want to open in the first value of a column, and then import the file using that as the path.

However, when I want to export this same file, giving it the same name, “First value of column” doesn’t work for me because the “First value of column” has to be in the actual dataset I’m exporting, and I don’t want the file path to be part of the table I’m exporting.

Would a possibility to avoid this issue be giving the option to select the “first value of column” of another table, not the current one you are working on?

Thanks,

Roberto

In this case, use a calculated parameter or/and put the export in a separate module.

Are you able to spell out how to use a calculated parameter to get the value of the filename from a table? Also, why should we use a new module for the export to csv?
Sorry new to EasyMorph.

Thanks
Mark

Hi Mark and welcome to the Community!

Calculated parameters are evaluated before the current project module starts running. After that, they are constant (immutable). Therefore calculated parameters can only be calculated using other parameters, but not table values.

Parameters of a module can be assigned with table values, when the module is called from another module. The process of calling other modules is described here: EasyMorph | Subroutines

See the example below.

export-file.morph (5.2 KB)

Notice that in the “Call” action, the parameter {Date} of the called module is assigned with the first value from column [Date] of the calling module.

Let me know if you have questions.

Brilliant. Thanks.

To learn more about EasyMorph visit easymorph.com.