One integer widget node instead of 2 integer widget nods for the input of a DB query node?

Hello,

at the moment i use two INTEGER WIDGET NODEs for the input of a DB Query Node (pic 1 below).

1_integer widgets mit DB Query

It’s about entering article numbers from to with this both INTEGER WIDGET NODEs.

Left Integer Widget node:
2_integer widgets mit Artikelnummer_min
subsequent Integer Widget node
3_integer widgets mit Artikelnummer_max

DB-Query Input
(highlighted in yellow)

Is there a node that does both “inputs” directly?

Thx in advance!

greetings

1 Like

Hello @USCHUKN1ME,

are you running your workflow on WebPortal and/or using Widgets in a Component? If not then you can use new node available from v4.4 to create multiple flow variables at once:

And if using this on WebPortal/Component View can you explain why is it a issue to have two nodes under the hood? Whether it’s one or multiple Widget nodes in workflow you still need one field for each value so from a visualization point of view it should be the same.

Br,
Ivan

2 Likes

Hi @ipazin,

below you can see the whole workflow:

But the variable Creator does not allow any entries from the user?
The entry of the article numbers vary.

No webportal !

Greetings

Hello @USCHUKN1ME,

It does. They need to open configuration window and input value to already defined flow variables.

You can also do following. Wrap two existing Integer Widget nodes or two Integer Configuration nodes inside Component. If you use Widget nodes users will have to open View to input wanted values while with Configuration nodes they should open component configuration window. I would go with Configuration nodes but all suggestions require one step as opposed to two step you have.

Here is Component’s guide in case you are not that familiar with it:
https://docs.knime.com/latest/analytics_platform_components_guide/index.html#introduction

Br,
Ivan

1 Like

Ok, you have to open the configuration Window!

I want it via a Widget.

Will try your suggestion.

Hi @ipazin ,

i put the two Integer Widget nodes into a component, the following window open

6_Integer_Widget_in_der_Componenten

5_zei_Integer_Widget_in_Componente

but now the Db Query Nodes “deliver” nothing!
“WARN DB Query Reader 3:61 Node created an empty data table.”

I guess there is no input !

Greetings

Hello @USCHUKN1ME,

Flow variables that are created inside the component have a local scope. Check above guide on how to change that.

Either that or execute and open view. Seems same effort to me. Only different representation.

Br,
Ivan

1 Like

Hi Ipazin,

if i use the Variable Creator, i guess i got problems with my two String configuration Nodes ?

These two nodes receive the entered article numbers via flow variables from the two integer Widget Nodes.

Greetings

Hello @USCHUKN1ME,

why is that if the output from Variable Creator is the same as output from 2 widget nodes (two flow variables)?

And why are you using Widget nodes to control Configuration nodes? Seems to me you might not need configuration nodes at all cause flow variables are transferred/available to downstream nodes regardless of connection type. Meaning flow variable defined in Widget nodes are available in Bar Chart node as well…

Br,
Ivan

1 Like

Hello @ipazin ,

Beginners mistake :neutral_face: :slightly_smiling_face:.

Another problem was that I didn’t change the settings in the variable Creator Node from string to integer.

8_Setting der Vreate and Define Variables in der Variable Creator Node

Below is the leaner workflow:

Everything works now!

Thank you !!

Greetings

3 Likes

Glad we got it working @USCHUKN1ME :slight_smile:
Ivan

1 Like

Hi @USCHUKN1ME , I’m glad you got it working too. However, it would seem that the solution was provided by @ipazin , which was to use the newly available node Variable Creator. Seems fair to tag his post as Solution.

2 Likes

Hi @bruno29a , @ipazin

aha thx !

I always understood it to mean that the tick must be ticked at the last post, at the end of the thread.

Greetings

@USCHUKN1ME , no, you would tick the post that you choose as solution. For example, you may get different suggestions for the same question/issue from different users, and all of them could be solutions, but there are always some better than others, you would tick the one that would best suit your need.

So, you would not necessarily tick the last post :slight_smile:

@bruno29a
Hm, that is correct!

I will consider this in the future.

Greetings

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