How do I finish this widget

I link using modulus approach is actually more straightforward and scalable with blueprints as @pezzott1 suggested.

so you would do DB2P % 40 then the output of that is a switch.