Updating current row in a table

Hello, quick question, an easy one

I have

testFunc:{[s]

    s, `new

}

tab:(sym:onetwo)

update sym:testFunc[sym] from tab

but the sym, in  sym:testFunc[sym] is passing the whole column, how do I only update one row at a time.

if I do 

update sym2:sym from tab

it works, so I’m not sure why when I pass it to a function its passing the whole column

Thanks

I think what you’re after is

q)update sym:testFunc each sym from tab

sym

-------

one new

two new

Hope that helps

Jonathon

Hi Roni,

The function will act on the whole column/vector. So you need to use each

update sym:testFunc each sym from tab

Or “vectorise” your function

testFunc:{[s]

    s,'`new

};

update sym:testFunc[sym] from tab

Regards,
Paul

Perfect, thanks!