I am trying to use a simple In List expression in a variable but no luck whatsoever at all … none, nada, ziltch, etc …
See the following expression:
=if([FruitType] In (“Apple”);“nice nice”;“no no no”)
(I realise I do not need to use ‘In’ with only one value, however I was trying to bring this to a very simple form because I couldn’t make it work with multilpe values either.
When using the above, WebI comes back to me saying that there is a syntax error at position 27 (which is after the second double quote) … I really don’t understand what is wrong with the expression … I tried with comma’s, single quotes, no quotes, hyphens etc … bu no luck whatsoever …
thanks for your answer - I do indeed have the inList in the subject to kinda hint at people as to what I am trying to achieve
The thing is that I obviously also tried InList and In List and List and IL and NiTsil and ListIn and quite a few more combinations for the sake of it … none of them worked I am afraid to report …
When I use In List or InList then WebI returns an error message when I validate the formula saying that the object List (or InList) does not exist on the report.
However, I can find the keyword/operator In in the list of available operators and It looks like that is the one I should be using however, although WebI accepts the operator, it gives an error regarding the arguments following the operator …
FYI, InList works exactly as expected in the full client.
thanks again for looking deeper into this … I still haven’t been able to make it work on my side so I was very happy to see your post. I tried your syntax but that failed again … who knows why? … I am using WebI 6.1a (or was it b?) so a version earlier that yours which would explain the difference in available functions and syntax (well, hardly but anyway …)
So, I am back at using if(myobject In (myvalues);“yes”;“no”)
but it keeps on refusing to accept whatever syntax I use! … and I tried without the quotes in the hope it would work as it did for you - but no such luck!
perhaps it’s version 6.1 which is different, don’t know. What’s the exact error message it’s displaying ? (and is there no InList in the available operators list ?).
Otherwise, you’re probably going to have to create it at universe level…or something like if([fruit] = “apple” or [fruit] = “lemon”;“yes”;“no”)
We’d already been given the “workaround” of using OR clauses. What I meant was that there was no sense trying more ways of using In or InList as they simply would not work.