Dynamic Column Filtering of a Table with Generic JavaScript View

Hi everyone,

One of our customer needs an urgent interface. This interface should contain Generic JavaScript View node to ensure data selection dynamically. Let me summarize the flow;

The corresponding data in excel reader node feeds Generic JavaScript View Node. The data coming from DB Query Reader shown below;

image

My goal is to develop an interface by using this form of data. The planned interface has two parts. The first part is asking the customer to add a new line or set the status as passive like shown below;

image

In the second part, when a customer choose adding a new line, the interface should look like this;

In the image shown above, dropdown menus should be filtered according to the change of the previous one consecutively. (Note: As the data dynamic, we can’ t define a static list for each dropdown). Text Input 1, Operator Dropdown (contains sql operators like <,NOT IN, LIKE vs.), Text Input 2 are created SQL Syntax column in the given excel. For example; a customer writes column1 for text input 1 and select a desired operator (let <) for operator dropdown and writes “5” for text input 2.

Having filled these parts and click OK button bottom right, filled data should be added the table like below;

image

The filled data can be stored as flow variables. With these flow variables, db writer node can be feeded these datas and the corresponding data can be inserted the data table.

When a customer select a “set the corresponding status passive” selection, the actual table should be opened and the user should be able to set the status passive when a user selects a row on the table and presses the OK button.

So, please can anyone help me? These processes can be easy for someone who knows javascript, but I don’ t know anything about JS.

Thanks in advance,

Best,

1 Like

Hi @KKERROXXX,

if you do not know any javascript and are not planning to learn it for this use-case… then i would suggest to stear away from the generic javascript view…

You should check if you cannot create something similar to your requirements with the configuration/widget nodes combined with the view nodes. (this is easier to setup without prior knowledge)

Always dangerous to say something is easy… without being able to do it yourself…

But I think what you want should be somewhat possible with the above mentioned nodes and a loop/recursive loop :thinking:

2 Likes

Hi @AnotherFraudUser,

I know that the process I mentioned can be done by using KNIME nodes, but the requeirement,“dynamically”, can not be provided without JavaScript node.

Thanks,

Hi @KKERROXXX , you can have processes run “dynamically” based on data/conditions without JavaScript node - of course, it also depends on what we call dynamic.

If it is based on user interaction, there are a few nodes, such as the single selection configuration node suggested by @AnotherFraudUser that offers interaction. You can then implement some logic based on what the user input.

And as per @AnotherFraudUser 's suggestion, if you do not know JS and do not plan to learn it, you can do without the JavaScript View node.

There are other Views, however, that still use JavaScript for the view and interaction, but are made easy to use without having to know JavaScript. The “Table View” node for example is one of them. It allows you to select/unselect rows that you want

1 Like

Hi @bruno29a,

I know that there are many ways to do that with the current KNIME nodes, but In this process, dynamically means that when i select a value of the first dropdown menu, the other one need to change instateneously. This is possible with the Generic JavaScript Node.

Best,

Hi @KKERROXXX,

i think then you will not get around learning javascript. :woman_shrugging:

At least the following javascript libraries could provide you support:

https://querybuilder.js.org/demo.html

Another possibility would be to create a javascript which interacts directly with the widget nodes to enhance them with the needed interactivity :thinking:

2 Likes

Hi @KKERROXXX , I see. Indeed, for this kind of interaction, you will need JS as it supports events such as onclick/onchange, as opposed to Knime where you have to click Next to continue to the next node and load a new screen for the “dynamic” drop down (as in values would be populated based on the results of the previous node).

So, your options would be to learn JS, or go with the “Next” screen (no instantaneous refresh).

1 Like

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