Dynamic range for Integer Configuration of a component

Hi,

I’d like to specify a min/max value for the range of an integer configuration of a custom component.

But as you can see, the min/max values are displayed gray, even when I used a boolean flow variable with value true in useMin and useMax. So I guess they’re just outputs?

If not, how can I use those forms? Otherwise, do you have an idea of how to specify min/max values?

Maybe I can’t even use them, because I’d need to calculate the min/max value inside the node.

I’d like to specify a min/max value for the range of an integer configuration of a custom component.

The maximum and minimum allowed values can be set in the control tab of the Configuration window:

image

But as you can see, the min/max values are displayed gray, even when I used a boolean flow variable with value true in useMin and useMax. So I guess they’re just outputs?

The “i” in the icon next to “min” and “max” tells you that the flow variable you specify here must be an integer. If you haven’t provided any integer flow variables, these will stay grayed out.

In these screenshot I supplied 2 variables to control min and max:


5 Likes

Hi @uie63112 , in addition to what @elsamuel has showed you, you should also consider controlling the Default Value. If the Default Value is out of the range of min and max, your Component will not work.

It’s better to set the Default Value to either the min or the max value via the Flow Variable.

You can check the component I created for this thread, it’s design to have dynamic min and max values for the Integer Configuration:

Here’s how the configuration looked like:

3 Likes

Thanks a lot @bruno29a and @elsamuel for your replies! That worked, but i have another problem with that:
Do you know if it is possible to execute code (python scripts or just KNIME nodes) within the component and use its output in a configuration node for the same component? Like this:

Hi @uie63112,

Take a look at this blog post on how to use the Refresh button widget for dynamic components Eight Data App Designs with the New Refresh Button | KNIME

best,
Gabriel

2 Likes

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