You can make buttons with commands like Set GROUPBY=name.
If you switch the button editor into advanced mode (if it isn't already), you can use the menus at the top of the command field to build commands and their arguments, and get the names of columns for arguments like GROUPBY.