Hello,
I'm triying to make the logic for evaluating a database field and depending if the value is 0,1,2,3 or 4 assign to the text label the value of variable1, variable2, variable3, variable4 or variable5 respectively.
The code i'm triying in vb.net is:
IIF {Cabecera.TDoc} = 0,{Variable1},IIF {Cabecera.TDoc} = 1,{Variable2},IIF {Cabecera.TDoc} = 2,{Variable3},IIF {Cabecera.TDoc} = 3,{Variable4},IIF {Cabecera.TDoc} = 4,{Variable5},'Error'
I know this is not correct, could you tell me what i'm missing?
Thanks,
Nico.
Problem generating expression
-
- Posts: 11
- Joined: Mon Jun 25, 2012 10:50 am
Re: Problem generating expression
Hello.
You could find description of these functions in our documentation.
Thank you.
You should use Choose (index, choice1, choice2, ...) function or if you have complex condition use Switch (condition1, value1, condition2, value2, ...)Nicolai_Petrov wrote:I'm triying to make the logic for evaluating a database field and depending if the value is 0,1,2,3 or 4 assign to the text label the value of variable1, variable2, variable3, variable4 or variable5 respectively.
The code i'm triying in vb.net is:
IIF {Cabecera.TDoc} = 0,{Variable1},IIF {Cabecera.TDoc} = 1,{Variable2},IIF {Cabecera.TDoc} = 2,{Variable3},IIF {Cabecera.TDoc} = 3,{Variable4},IIF {Cabecera.TDoc} = 4,{Variable5},'Error'
I know this is not correct, could you tell me what i'm missing?
You could find description of these functions in our documentation.
Thank you.