For billing purposes I need to know how many languages are selected in a field called languages. So if English, French, Spanish is selected in my checkbox I need to know that there are 3 languages. I couldn't figure out a direct way to do this and think I remember a previous conversation about this. So I came up with a hack. So I have a calculated field called language count with the following formula: SUM(LEN(Languages),-LEN(Replace(Languages,", ",",")),IF(LEN(Languages)>0,1,0)) I'm replacing the normal syntax of a comma with a space with just the comma and subtracting the lengths of these 2 strings. Since either a blank or a single selection can have no commas, I just check if there is any values set and add 1. I'll simplify with A, B, C, D instead of longer names:
So the Length of A, B, C, D is 10
The length of A,B,C,D is 7
10-7=3
If there is at least one element in the list add 1
So 10-7+1=4 -- Melinda Layten, Senior Consultant Work Management Improvement CapabilitySource Phone: (484) 505-6855 site:
www.capabilitysource.com email: melinda.layten@capabilitysource.com - we simplify your work so you can run your business -