Get Data Sample Filename through Javascript

Hello,
I need to extract data from the original data filename via Javascript.

I work with multiple data samples for multiple countries that I need to switch between while designing. I need to get the filename of the currently active data sample.

I know that I can set a debugging filename in “OriginalFilename” in “Fixed automation properties” but that just is not feasible, since I would have to copy&paste a filename every time change the data sample. That is highly unergonomic and time-consuming.

It should be possible to get the active data sample filename via Javascript from the Eclipse environment?

How can I do that? Thanks in advance.

Unfortunately, that’s not currently possible. The data.filename property contains the name of the current file, but at design time, that’s a unique, temporary name since several sample files can have the same original name. And the automation.properties.OriginalFilename property is not set at design time, it is only set at runtime.

We already have an improvement request in our system for this feature (SHARED-74921), I will bump up its priority.

1 Like

That would be great.

A good solution would be to set a value retrieved by Javascript from the selected sample data in the debug value in

automation.properties.OriginalFilename

Or alternatively just an object property I can access via Javascript.

I am also wanting this feature :slight_smile:

Has there been any updates to this? Thanks

I quickly checked the ticket. This feature will be part of the oncoming 2022.2 release (eta November).