I am looping through 3 notepad files and everytime fetching specific value(using substring).
I want to add all the values and save in one varable.
i am using
assign: a-Value taken from notepad(string )
(integer value) b=convert.toint32(a)+b
But the value of b is becoming 0 everytime it is looping. so not giving total calculation.
Hi Valli,
First create a variable and initialize it to empty string.
Str = “”
Use “str = str + subStrVal1” in assign activity
Similarly use assign activity for subStrVal2 and subStrVal3.
Set the scope of the str variable properly.
It should work fine.
Thanks all for the reply… Actually i am invoking this code from main flow. and the loop is in main workflow where in the current calculation should happen inside invoked wok flow the calculated value i am passing through in/out arg . while it is looping through, the value in the first loop is not carrying forward to second loop… but it is again reset to 0.
Please make sure you are not assigning any default value to the in/out argument. Also check if the variable holding the arg value is being assigned 0 anywhere else in the workflow. Try to print them inside the workflow and after invoke to verify.
Like Tuhin and Reda said it would be easier to help you with a sample to identify the root cause.