insert dat - auto insert

is there any way to automagically insert a sequence of row or column values using an insert dat?

for example- i have a table with 3 columns

8204937
626249
0249548324

and i want to use the insert dat to create a new table with automatically created row IDs.

row_01-8204937
row_02-626249
row_03-0249548324

i’ve always done this in the past by using another script- or by tediously typing the insert contents by hand- “row_01 row_02 row_03”…

i forgot to add- i’m trying to do this in python. so i guess i’m trying to iterate over the input table’s row count and do something like this-

’ '.join([‘row_0’,‘row_1’,‘row_2’])

which creates this string

row_0 row_1 row_2

and which works as an expression in the contents field…

maybe a single line for loop?

ok,

this works

’ '.join([‘row’+str(i) for i in range(op(‘table2’).numRows)])

where op(‘table2’) is my input table.

now all i need to know is how to access the input table automatically- not by calling it specifically by name. is that possible?

yay! this works-

’ '.join([‘row_’+str(i) for i in range(me.inputs[0].numRows)])

learning!

1 Like

AWESOME!

Thank you for elaborating on your question and continuing the conversation :slight_smile:


Brain.

1 Like