I am reading it that you want X rows (X being the Long value selected in ddlb_1) inserted into the DataWindow. And then in column "colom1" you want the value selected in ddlb_2 put into that column. And then in the column "colom2" you want a list of numbers going from 1-to-X, correct? If so:
/*SCRIPT*/
String ls_comma, ls_no_comma
Long ll_cnt, ll_row, ll_count, ll_cumulative
//get rows from DDLB_2
ll_count = Long( ddlb_2.Text ) //number of rows
//build numeric string
FOR ll_cnt = 1 TO ll_count
ls_comma += String( ll_cnt ) //comma-delimited
IF ll_cnt <> ll_count THEN ls_comma += ','
ls_no_comma += String( ll_cnt ) //no commas
ll_cumulative += ll_cnt //cumulative sum
NEXT
//get rows from DDLB_1
ll_count = Long( ddlb_1.Text ) //number of rows
FOR ll_cnt = 1 TO ll_count
ll_row = dw_2.InsertRow( 0 )
dw_2.SetItem( ll_row, 'colom1', ddlb_2.Text )
//use ls_comma, ls_no_comma, cumulative, etc
dw_2.SetItem( ll_row, 'colom2', ls_comma )
NEXT
/*END SCRIPT*/
Let me know if I missed the point entirely.
