Possible to create a popup message

Is it possible to create a popup with a message. Is there a node to do this.

F.i . if you check number of columns in file and this is not what you expect, then like to create a popup message

1 Like

Hi there!

No. It is not possible to create a popup window from within KNIME. KNIME Server offers possibilities to dynamically control workflow execution if that is what you are aiming for.

Alternatively for your example you can send yourself a email notification whether number of columns is what you expect or not. Also there are Table Validator and Table Validator (Reference) nodes that might help in this case.

Br,
Ivan

It is technically possible to do this by employing the Java Snippet node. Screenshots attached:
41%20AM

10 Likes

Hi there!

Or it seems it is possible :man_facepalming:

Tnx @quaeler :slight_smile:

Br,
Ivan

3 Likes

Hi quaeler,

Thanks for the java snippet solution.

if i use your javacode it works fine and i get a popup message and after clicking “OK” the popup closes.

But now I have entered an other code, only the line : "JOptionPane.showMessageDialog(null,"Column Headers are not the same ", “Check Column Headers”, JOptionPane.INFORMATION_MESSAGE);

Only now the message appears, but don’t close after I clicked the “OK” button.

What is wrong in the code? Why doesn’t close the popup message. Now i have to cancel it.

thanks,

Ron

2 Likes

Can you paste in your code so i can see?

It’s important to remember that the code in the node gets called once per row, which is why i put in my code the check to only show the dialog when the row index is the last row - if you don’t do this check and you have 5000 rows, that’s going to be 5000 popups that you’ll need to dismiss :- )

2 Likes

Hi Quaeler,

I have moved the Java snippet node after the Table Validator and now the message box closes after clicking the “OK” button.

Thanks,

Ron

image

2 Likes

I have problems with the JavaSnippet. Sometime the pop-up shows, sometimes the JavaSnippet gets stuck and no message shows. Any suggestions?