I am trying to write a query using the Switch function. My expression is supposed to check four boolean fields and according to which one is true, return a value between 'a' and 'd'. However the expression is returning the value '1' when it finds the field which is set to true.
This is my expression Expr1: Count(Switch(([Correcta]=True),"1",([Correctb]=True),"2",
([Correctc]=True),"3",([Correctd]=True),"4")
I had to put the field name and true in brackets, as without them I got the error 'data type mismatch'
Any ideas??
Thanks!
This is my expression Expr1: Count(Switch(([Correcta]=True),"1",([Correctb]=True),"2",
([Correctc]=True),"3",([Correctd]=True),"4")
I had to put the field name and true in brackets, as without them I got the error 'data type mismatch'
Any ideas??
Thanks!