on 09-14-2009 3:05 PM
Hi All
I need to pass the multiple conditions dynamically to the conditional Action block.
My approach: 1st condition I have assigned to a local variable.I have used a for next loop.From 2nd condition I am using "Local variable or SomeExpression".
Now problem is always I am getting the ist value only.
e.g. suppose ist condition has returned as 0 and 2nd condition has returned as 1. So 0 or 1 should be 1 as output.But it is throwing as 0 only.
If in the XPath, I will do hard code value like number(0 or 1) , it is throwing the correct result.But when it is coming from query, then it is throwing wrong result.
i have tried to use "||" instead of "or", but still same issue is persisting.
Any idea why it is happening like this.
Thanks
Manisha
Manisha,
Can you post the expression you are using. What are the expected results from the query? Can you brief more on this.
-Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the first assignment before for loop i am using the Xpath like this
Local.UpTimeCondition =
number(stringif( qry.Results{/Rowsets/Rowset/Row[#For_Next_Loop_1.CurrentItem#]/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/Row[1]/Item},1,0
))
After for loop i am using second assignment like this
Local.UpTimeCondition=
number(Local.UpTimeCondition &"or "&stringif(qry.Results{/Rowsets/Rowset/Row[#For_Next_Loop_1.CurrentItem#]/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/Row[#For_Next_Loop_2.CurrentItem#]/Item},1,0))
but it was throwing only first value output.
Thanks
After for loop i am using second assignment like this
Local.UpTimeCondition=
number(Local.UpTimeCondition &"or "&stringif(qry.Results{/Rowsets/Rowset/RowFor_Next_Loop_1.CurrentItem#/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/RowFor_Next_Loop_2.CurrentItem#/Item},1,0))
from above expression
Suppose
Local.UpTimeCondition=1 and
stringif(qry.Results{/Rowsets/Rowset/RowFor_Next_Loop_1.CurrentItem#/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/RowFor_Next_Loop_2.CurrentItem#/Item},1,0) =0
and if your desired output is 1or0 then your expression should be
Local.UpTimeCondition=
(Local.UpTimeCondition &"or "&stringif(qry.Results{/Rowsets/Rowset/RowFor_Next_Loop_1.CurrentItem#/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/RowFor_Next_Loop_2.CurrentItem#/Item},1,0))
that is what i understand
but if you want output as 1 Logical OR 0 then your expression should be
Local.UpTimeCondition=
(Local.UpTimeCondition || number(stringif(qry.Results{/Rowsets/Rowset/RowFor_Next_Loop_1.CurrentItem#/Status} ==
String_List_To_Xml_Parser_0.Output{/Rowsets/Rowset/RowFor_Next_Loop_2.CurrentItem#/Item},1,0))).
Manisha,
What version of MII are you using? Can you also post the expression so we can investigate it?
Thanks,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
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.