Unique composite fields

So I have a calendar, with three components: Office, Date and Shift. Only one person can take a shift at a specific office, on a specific date, for a specific shift.

My first thought was to create a composite field with the three elements, and declare that as unique. However, you can’t designate a formula result as unique.

In DB2 I could chain out to a logical (index) with the office, date and shift and if I got a hit I could throw up an error stating “this shift is already taken”.

I was looking at rules and they don’t seem to accomplish what I’m trying to do…

Another option would be to create a table with every combination of Office, Date and Shift, like in the Volunteer demo app, but don’t really want to create a table with thousands of records, when people don’t sign up for most shifts.