In order to color code each row of a calendar I'd like to be able to create a unique integer from 1 to 9 using the field userid. I need to use the color in another part of the calendar to display the student assigned to the instructor.
Bear in mind that userID can be any length.
At first I thought of using the least significant digit, but that won't work for user IDs 01, 21, 22 etc.
Then I thought of adding the left to the right, eg userID 22 = 2+2=4, but that won't work either.
Any ideas how I might create a unique 0-9 integer based on the users ID?