Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7189 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?!?

Posted

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?!?

Posted

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?

Posted

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?

Posted

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.

This topic is 7189 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.