I can think of a few solutions, depending on how your data is saved.
If it is saved as a list of texts, you can add the check boxed ones to the list for each one that is true.

If saved as yes/no solutions in the data, then simply change the variables based on if they are checked or not.

I like the text options as a list personally. As you add more departments, or if added manually, it will be easier to recall. I use this for item categories and for adding cities on my item rental platform. You can also use option sets to avoid typos when calling on those variables.