John May Posted July 28, 2004 Posted July 28, 2004 I am trying to write a Case function to translate a text string to a code. The text string is a language name, and there are about 165 of them I have to translate. The first few lines of the calculation look like this: Case( Language = "Chinese, Mandarin", "0300", Language = "Chinese, Yue (Cantonese)", "0320", Language = "Hmong", "0640", Language = "Laotian", "0870", Language = "Romanian", "1190", Language = "Russian", "1200", Language = "Serbo-Croatian", "1270", Language = "Spanish", "1380", Language = "Ukrainian", "1520", Language = "Vietnamese", "1560", When I paste the list into the Specify Calculation window, I get an error message saying there are "There are too many separators in this function", and the end of the 35th iteration is highlighted. I looked for a misplaced comma or something, but can't see one. I resorted the list and pasted it in again, and again I got the error message and it highlighted the end of the 35th record. Is there a limit of 35 iterations? I can't find anything in any documentation I have.
Fitch Posted July 28, 2004 Posted July 28, 2004 You may be hitting the calculation length limit. With that many permutations, I would strongly consider using a separate lookup table instead. For one thing, it would be a heck of a lot easier to maintain (add or delete a language, or change a code). Another benefit would be to use the language table in a list view or portal to select the language, I would think that would be less cumbersome than 165-long value list.
-Queue- Posted July 28, 2004 Posted July 28, 2004 Case is limited to approximately 170 tests (168, if I recall correctly). I wonder if there is some other error involved. I do agree with Tom, however, that a lookup table would be better.
Recommended Posts
This topic is 7492 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now