Set matrix position using other button

Hi,
I have one button that I wish to use to set a matrix (of buttons) in position one (first button on other off).
I know to set all to off but not this one.

It's probably something like this but I'm missing something

set("matrix_@{parent.variables.id}StepSeq/$1", 1)

I guess you want something like

var m_id = 'matrix_' + getProp('parent','variables').id  + '/'
set(m_id + '*', 0) // set all buttons off
set(m_id + '1', 1) // set first button on

almost perfect, all the button went off but the first one is not set to 1

var m_id = 'matrix_' + getProp('parent','variables').id  + 'StepSeq/'
set(m_id + '*', 0) // set all buttons off
set(m_id + '1', 1) // set first button on

Oops, the first button's index is 0, not 1. Attached session file works fine: matrix.json (3.4 KB)

Ok so I was on the right direction but with a strange behavior
In my session that's not working ?!
matrixTest.json (7.1 KB)

You need to pass 127 instead of 1 to set() since the buttons in the matrix have on set to 127.

forgot I was in midi not in OSC
thx