How can i open a link of L Drive "Network drive", using the KNIME and make it clickable on Javatable view?

Hi
I have awork flow, and i can’t find the right way to view the folder path as clickable link on Javascript table view.
I tried to make it with python script but it open all the time a white window, not the folder location with folder explorer !
PS: other solutions are most welcome, like how can i use JavaSnippet if that possible?

Hi @RamyHussein , I found an example solution on the hub for you. Previously I thought that the new Table View didn’t support it, but you can make it work by adding a String Format Manager and select the option to render hyperlinks.

The above solution is the “Modern” way of achieving what the old Table View (now “Table View (Javascript) (Legacy)”) node used to do automatically, as demonstrated here:

NB, in the top example they also use Table Manipulator first to render a full <a href="..." /> string to html so that the hyperlink appears on the text, rather than appearing as the full clickable url.

edit:
Having just had a play around with the demo, I can see that you don’t actually have to have the String Format Manager if you already have a column containing an HTML hyperlink but instead can just use the Table Manipulator node, and tell it to change the type from String to HTML

So, if you have a prepared html hyperlink, you can use Table Manipulator, but if you just have a url, you can use String Format Manager.

1 Like

Thanks @takbb ,
i tried those exampled before but unfortunate they didn’t give me what i am seeking.
My folders are in a virtual drive, and i could made the path into a variable, and convert it to HTML, but to open it to typical windows folder explorer is not happening.
the Path it self something like

\\nlgotp02\LpdProjecten\folder\folder\folder\folder\folder\folder

Ah, my apologies @RamyHussein , I can see this needs further investigation. I’d assumed that with the option to “Link hyperlinks” it would have worked equally well for all URL protocols including file://

That doesn’t seem to be the case. I don’t know if it’s because of some security concerns , or just an oversight :frowning:

(If I recall correctly, on some document collaboration tools such as Confluence, it won’t let you create local hyperlinks for “security reasons”)

I did play around with opening hyperlinks from a data app as well and had similar experiences that I could not get it to work and it seemed to be down to KNIME blocking opening the windows - likely for security concerns as you mentioned

it is ok @takbb
In fact i tried to use the same ideas,
the sting manipulation below : opens the link, but as save as !!!
join(“<a href=\“file://”, replace($Path$, “\\”, “/”), “\”>Open Folder”)

i am sure that there is a thing can be done with Jaca Snippet, but i don’t know how to configure it !

@RamyHussein here is a component by @iCFO that opens the local /data/ folder. Question is if this could be adapted to also handle other paths.

1 Like

I just added flow variable support to my component referenced above. You can now point it to any folder location via path flow variable using the variable name “open-path” after designating it instead of the Local Workflow data folder in the Config window.

This component is designed to be a one time manual launch function that is controlled via the Interactive View (Shortcut F10), so that it it returns to bypass mode during subsequent execution runs.

Here is a workflow that you can use to test the flow variable functionality locally. Just select a local folder location.

Folder - File Open.knwf (363.0 KB)

Definitely not a hyperlink table solution, but maybe you could mine it for some workarounds… It does have the ability to select a file location from a list and open it in a 1 time action. You could certainly apply that functionality to a selection column in an interactive table.

2 Likes

Well,
Thanks for all your efforts and suggestions @takbb , @mlauber71 and @iCFO .

I spent some time to understand how the JavaScript work, and i managed to have it in my workflow, and it works exactly as i was aiming.

The configuration as you see here below :-

Also the Application works perfectly like below :-

Thanks again for your ideas :slight_smile:
Ramy

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.