I was looking through the code and found
WORKGROUP is the current workgroup,
nil otherwise.") which seemed to be what I want, but if the current workgroup is called "main" and I do
nil. I'm not sure if I'm doing something wrong or misunderstanding the function. I couldn't find a way to get the current workgroup name either. I'd also like to be able to do this with the workgroup index as well.