As far as I know, you can’t set the saved/displayed value of any control from pattern code right now. I wish you could. It’d be a useful improvement, and maybe we’ll see it in a future version.
There’s some discussion about controls, and issues around saving/restoring persistent variables from patterns in general here: