Friday, March 9, 2012

expression question

Hi
Dose "Expression" can write any syntax such as CASE... WHEN... Structure?
I have a serial code such as B1, B2, B3.
When B1, the "jump to url" to http://b1.aspx. B2 the http://b2.aspx
I wirte this use IIF now but feel this way dosen't make sense.
So is any other way can instead of IIF?
Thanks for help! (I use RS 2005)
Anginot sure if you can use the case statement, in theory I don't see why
not. I also was getting irritated writing lengthy or having the giant
iif statements, so instead I now create methods in the Code tab and
simply pass the value into the method and return the result.
seems neater this way|||Try using SWITCH instead of IIF.
The syntax is
SWITCH(test1,option1,test2,option2,...)
compared to
IIF(test1,option1,IIF(test2,option2,IIF(...)))
It reads the comma separated sequence in pairs and executes the first
one that has a test = true.

No comments:

Post a Comment