it seems to me that false condition do not evaluates at all, otherwise even an empty field will give 0.
I noted that a false condition will put the field contents, so if field1 = a, field2 = "", field3 = aa we'll have:
mi sembra ricognoscere il tuo viso ;) (sorry for my Italian)
I agree that what you describe is what SHOULD happen. The reason why I reported a bug is because it's not working with this specific field type.
Thank you for your post.
What are you expecting to happen? What is the field type?
If I want the false condition to be null, I specify the false condition. Otherwise, the field will remain as it is. Change the calculation to the following, and see if this is what you want.
Case ( field1 ; "A"; "" );
Case ( field2 ; "B"; "" )
Case ( field3 ; "C"; "" )
usually, if you write Case ( False ; 1 ), you get "" (null)
This is actually what happens if I simply write this :
Case ( myField ; 1 ) (I get null if the field is empty)
But not if
- the expression is nested in a list function
- AND the field type is tinyint (mySQL) - works with other field types, including Integer.
1) create a field ( named field )
2) create a calculation field with calc:
Case( field ; 1 ) ;
Case( field ; 2 )
> What are you expecting to happen?
If field contains: "a" ( w/o quotes ) the result must be empty ( but it gives: a¶a )
If field contains: 10 the result must be: 1¶2 ( this is correct )
If field contains: 0 the result must be empty ( but it gives: 0¶0 )
If field contains: "" the result must be empty ( this is correct )
So we have two cases in which the calculation fails and the wrong results come ONLY from the List ( ) function, because Case( field ; 1 ) gives always correct results.
| Up |
Thanks for the information. I have forwarded the information to our Development and Software Quality Assurance (Testing) departments so they are aware of this issue. In the mean time, include the false portion of the Case function. That is,
Case ( field; 1; "" );
Case ( field; 2; "" );