I'm not a programmer, but did you try using a 'custom code' block to do it?