How to use Generic JavaScript View to update and export flow variables with a button click?

Hi everyone,

I’m currently working on a workflow where I need to use the Generic JavaScript View node in KNIME. My goal is to design a UI element (specifically a button) so that when a user clicks it, the workflow can:

Update and export existing flow variables (those that were initially imported into the view).

Use the modified flow variables to decide which dataset or query result should be exported.

The reason behind this design is that I’m building a text-to-SQL workflow, where users may want to interactively select whether they want to export a full query result or some other variation of the result. By clicking the button, I’d like the corresponding flow variable to be updated, so that the workflow knows which output to generate.

My additional question is:

If I successfully update and export flow variables from the Generic JavaScript View node, and then connect it to a downstream Database Query node, will the workflow automatically execute the downstream query right after the button click in the UI? Or would I need to trigger the execution in some other way?

Has anyone tried something similar or can suggest the right approach?

Thanks in advance!

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