Icon

kn_​forum_​48460_​lottery_​numbers

a workflow to draw lottery numbers - like 6 out of 49

a workflow to draw lottery numbers - like 6 out of 49

-------
if the loop is on the first iteration the temporary table will initially get reset

if($${IcurrentIteration}$$ == null) {
return 1;
}
else if ($${IcurrentIteration}$$.equals(0)) {return 0;}
else {return 1;}


a workflow to draw lottery numbers - like 6 out of 49 A meta collection about Loops, Switches, Paths and Flow Variables in KNIME (and some ZIP files)https://hub.knime.com/mlauber71/spaces/Public/latest/_loops_and_flow_variables_knime~CET0X2z2VY9oKlYN if the loop is on the first iteration the temporary table will initially get resetif($${IcurrentIteration}$$ == null) { return 1;}else if ($${IcurrentIteration}$$.equals(0)) {return 0;}else {return 1;} prepare the possible range of lottery numbers (v_lottery_no_numbers) create empty valuetableinitial value is 0_temp.table=> switche makes sure this isinitially empty_temp.tableadd current valueto the collectedvalues_temp.tablev_select_portv_lottery_no_numbers$lottery_number$ + $${IcurrentIteration}$$ +1DRAWnumbersSTARTassignrandomnumberssort by randomnumberselect thetop numberexcludealready drawnnumbersmake suresample file is emptyDRAWnumbersSTOP_temp.tablelottery_numbers.tabletheRowIDis the position in the drawinsertcurrent iterationv_numbers_to_be_drawn Table Creator Table Writer Table Reader Concatenate Table Writer CASE Switch Start CASE Switch End Java EditVariable (simple) IntegerConfiguration Counting Loop Start Math Formula Loop End RowID Counting Loop Start Random NumberAssigner (Apache) Sorter Counter Generation Row Filter ReferenceRow Filter Row Filter Variable Loop End Table Reader Table Writer RowID ConstantValue Column IntegerConfiguration a workflow to draw lottery numbers - like 6 out of 49 A meta collection about Loops, Switches, Paths and Flow Variables in KNIME (and some ZIP files)https://hub.knime.com/mlauber71/spaces/Public/latest/_loops_and_flow_variables_knime~CET0X2z2VY9oKlYN if the loop is on the first iteration the temporary table will initially get resetif($${IcurrentIteration}$$ == null) { return 1;}else if ($${IcurrentIteration}$$.equals(0)) {return 0;}else {return 1;} prepare the possible range of lottery numbers (v_lottery_no_numbers) create empty valuetableinitial value is 0_temp.table=> switche makes sure this isinitially empty_temp.tableadd current valueto the collectedvalues_temp.tablev_select_portv_lottery_no_numbers$lottery_number$ + $${IcurrentIteration}$$ +1DRAWnumbersSTARTassignrandomnumberssort by randomnumberselect thetop numberexcludealready drawnnumbersmake suresample file is emptyDRAWnumbersSTOP_temp.tablelottery_numbers.tabletheRowIDis the position in the drawinsertcurrent iterationv_numbers_to_be_drawnTable Creator Table Writer Table Reader Concatenate Table Writer CASE Switch Start CASE Switch End Java EditVariable (simple) IntegerConfiguration Counting Loop Start Math Formula Loop End RowID Counting Loop Start Random NumberAssigner (Apache) Sorter Counter Generation Row Filter ReferenceRow Filter Row Filter Variable Loop End Table Reader Table Writer RowID ConstantValue Column IntegerConfiguration

Nodes

Extensions

Links