Programming of a button

Hi,
I am trying something that should be very simple, but I am failing at it.
I am looking for the correct way to programm a button to send a value (0 or 1) to a variable in the pmData object, if the button is pushed.
Best regards
I am trying something that should be very simple, but I am failing at it.
I am looking for the correct way to programm a button to send a value (0 or 1) to a variable in the pmData object, if the button is pushed.
Best regards