How to use the DialogComponentColumnFilter when In-Port number is 0 ?

addDialogComponent( new DialogComponentColumnFilter( new SettingsModelFilterString(“m_data_column”, new String {“include column 1”,“include column 2”,“include column3”} , new String {“exclude column 1”}) , 0, true ));

The third parameter request an in-port index in DialogComponentColumnFilter() but i don’t have an In-Port. How can i use this component? I also checked the API Docs, all DialogComponentColumnFilter() need the in-port index.

Can anyone help me out with this ? thanks

If you node doesn’t have a input port then what columns do you want to filter in your node?

I will get the data table from URL inside the node but i don’t know how to show the columns in DialogComponentColumnFilter. Like SetIncludeList(my columns) to show in the dialog.

I think you should just use a DialogComponentStringSelection, you can fill it with custom values and it is not constrained to columns in any way.
best,
Gabriel

Hi @gab1one ,

Good day. I know this topic is a bit old but I am new with knime node development, and I want to implement the DialogComponentColumnFilter. I am having a hard time getting the columns from my input port. Can you help me with this? I want to get the list of columns from an Array list then use it on DialogComponentColumnFilter. Any advice would be very helpful.
Thanks in advance!

Br,
Gambit

Hi @Gambit,

You can get the columns into the dialog via the loadAdditonalSettingsFrom method, take a look at this example:

The array contains one DataTableSpec objects per input port of your node, you can extract from it the column names with the getColumnNames() method.

best,
Gabriel

1 Like

hi @gab1one ,

Thank you for your this! I will check on this and study.

Have a nice day!

Br,
Gambit