on 04-18-2012 11:01 PM
Hi
Im migrating from xmii 11.5 to mii 12.2, and we are facing that this class of sentences is not working properly in MII, but it was working perfect in XMII
stringif(Repeater.Output{/Row/dbInd} !="" and Repeater.Output{/Row/dbInd} != "NA" and Repeater.Output{/Row/dbInd} != nullstring, Local.DBInd & Repeater.Output{/Row/dbInd} & "," , Local.DBInd)
I tried using another || or &&, and we have the same problem
stringif(Repeater.Output{/Row/dbInd} !="" || Repeater.Output{/Row/dbInd} != "NA" and Repeater.Output{/Row/dbInd} || nullstring, Local.DBInd & Repeater.Output{/Row/dbInd} & "," , Local.DBInd)
The problem is that whenever you put "and, or, ||, &&", the conditional does not work fine. and the result is always true.
I even use this for testing purposes
stringif("A" == "A" && "B" == "B", " FALSE", "TRUE");
stringif("A" == "A" and "B" == "B", "FALSE", "TRUE");
stringif("A" == "A" or "B" == "B", "FALSE", "TRUE");
stringif("A" == "A" || "B" == "B", "FALSE", "TRUE");
All the results are always "FALSE" , that is incorrect. Can you help me with this? I have a lot of transactions using this kind of sentences and Im soon to go live. I hope somebody answer me today before send this to an OSS
Thank you
Hi Fernando,
First thing I found is that the stringif function parameters are like this 'stringif(condition, onTrue, onFalse)'.
I even use this for testing purposes
stringif("A" == "A" && "B" == "B", " FALSE", "TRUE");
stringif("A" == "A" and "B" == "B", "FALSE", "TRUE");
stringif("A" == "A" or "B" == "B", "FALSE", "TRUE");
stringif("A" == "A" || "B" == "B", "FALSE", "TRUE");
So for the above 4 examples you have written the onTrue parameter as 'FALSE' hence everything is returning false.
Second point is whenever you use '&&' or '||' please use the expressions within brackets.
Example: stringif(("A" == "A") && ("B" == "B"), <condition for onTrue>,<condition for onFalse>);
Thanks,
Suhas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.