March 21, 200520 yr Author Case( mod(char1+8;26)=1, dsd_code = dsd_code & "A", mod(char1+8;26)=2, dsd_code = dsd_code & "B", ) I have to do a calculation to know what letter correspond to the number... I get the "an operator (e.g. +, -, ...) is expected here" message... why!? I also tried multiple if, like: If( Mod( char1 + 8 ; 26 )=1 ; dsd_code & "A"; "") If( Mod( char1 + 8 ; 26 )=2 ; dsd_code & "B"; "") If( Mod( char1 + 8 ; 26 )=3 ; dsd_code & "C"; "") I get the same error... anyone can help to go through that step?!?
March 21, 200520 yr Case( mod(char1+8;26)=1, dsd_code = dsd_code & "A", mod(char1+8;26)=2, dsd_code = dsd_code & "B", ) I have to do a calculation to know what letter correspond to the number... I get the "an operator (e.g. +, -, ...) is expected here" message... why!? I also tried multiple if, like: If( Mod( char1 + 8 ; 26 )=1 ; dsd_code & "A"; "") If( Mod( char1 + 8 ; 26 )=2 ; dsd_code & "B"; "") If( Mod( char1 + 8 ; 26 )=3 ; dsd_code & "C"; "") I get the same error... anyone can help to go through that step?!?
March 21, 200520 yr Strange I copy and paste both your examples into an FMP file, replace your fields with fields in my table, no errors. When you get the error what part of the calculation is highlighted as the error?
March 21, 200520 yr Strange I copy and paste both your examples into an FMP file, replace your fields with fields in my table, no errors. When you get the error what part of the calculation is highlighted as the error?
March 22, 200520 yr Case( mod(char1+8;26)=1, dsd_code & "A", mod(char1+8;26)=2, dsd_code & "B", ) The syntax for Case is Case ( test1, result1, test2, result2,...) The result dsd_code = dsd_code & "A" is not really a result; the "dsd_code = dsd_code" is really a test. Part of the problem is that you have not told us what the calculation field's name is. A calculation field cannot modify another field, so I have to assume that the field is dsd_code. In this case the expression should be Case( mod(char1+8;26)=1, dsd_code & "A", mod(char1+8;26)=2, dsd_code & "B" ) There should be no comma after the last expression.
Create an account or sign in to comment