Parameterize a column name using flow variable


am looking to do the following:

  1. i have a table with the following columns - Qty_North, Qty_South, Qty_East, Vol_North, Vol_South, Vol_East
  2. give user a list of columns matching a certain pattern (let's say the word 'Qty'). So the user is presented with the column names - Qty_North, Qty_South, Qty_East
  3. User chooses only 1 column
  4. This gets passed as a flowvariable to a java snippet that also has the table as an input; executes a custom business logic and outputs an appended table

I already have the Java snippet working well with my custom business logic but I currently connect the table to the snippet and manually change the column name. It'd be great if I can pass it as a flow variable.

Even if i'm not able to do step 2, but pass the column name using a flow variable, that'd be awesome

thanks much!

Can you use the quick form nodes.

simply use the extract column header node, from the top outport, connect a transpose column, now connect a row filter, and use *Qty* as a wildcard filter, connect a domain calculator node to refresh what available options there are in the column, finally connect a Value selection quick form node. Now just connect the variable port from this to your java snippet node. In the snippet node tou should now be able to replace the column name for the flow variable name. If you wrap all these nodes into a metanode then the user can right click on the metanode and choose configure to get a nice user GUI.

hope this helps


Wow - tremendously useful - thanks. Had a bit of a trouble with the column name showing up as string and the inability to perform any math function on it. Just needed to do a getCell(FLOWVARNAME, tDouble) in my JAVA snippet :)

thanks a bunch again...