Skip to main content

Hello,

 

 I am currently working at a script that must generate an HTML report based on data from multiple sources.

Among many other elements, my HTML report has a table with 3 columns:

Column 1 is an ID, column 2 some description (not important), and third column must contain links to local html files. These local HTML files have in their name the ID from first column and I used a FeatureJoiner and tested if  “name of the file” = “ID”.

I tested for one task with an ID and 4 files that contain the ID (if file contains the ID, link to the file must go in the third column).

The issue is that after running the script, only link to one html file appears in third column, not all 4 of them.

Steps performed in the script for inserting links to local html files inside a table from an HTML report.

Using “Directory and File Pathnames ” I read data from local (html files I want to insert in table ).

I create a new attribute “doc_dir” and I set the value to “path_filename” in order to keep name of the files along with extension (.html and .htm in my case).

Using a StringConcatenator I build the entire URL in an concatenated result (@Value(path_directory_windows)@Value(doc_dir)) and the value is stored in out attribute called “URL_html file”. Further I extract only first 10 chars from the name of the file in order to obtain the ID which later to be matched with my Task ID(first column).

Using FeatureJoiner I test if “name of the file”(better said extracted part of the name of the file) = “ID”.

Where is a match, I write the link in third column from my report (obviously using HTMLReportGenerator). Please see below a pic with this part from my script.

Any ideas on how to add in my third column from the report all links to files and not the first one?

 

Thank you!

Nicu

 

I believe the attribute would need to be a single record with linefeeds, form feed, or carriage return between each URL. Put them in a list with a ListBuilder if they aren't already in a list and use a ListConcatenator with one of the special characters under the editor function.

 

Capture


Reply