'If' activity error in Excel loop

I’m currently doing the Weather report exercise in the community edition.

I have an excel loop activity, and within the excel loop there is an ‘If’ activity which has a statement, 'CityTemperature < “10” ', and then two write to excel activities in then and else:
then Write to ‘isthedaycold’, value ‘Coldday’,
else write to ‘is thedayhot’, value ‘hotday’.

When performing a Test run, the temperature is extracted from the search page result and printed in the excel sheet under the column ‘Temperature’.

As some temperature values are bigger than 10, ‘Hotday’ should be printed under the ‘isthedayhot’ column, instead the ‘Coldday’ value is printed.

Any suggestions as to why this is happening and how to correct this?

Thanks

Hi,

Debug your process and using watch and see the value of argument before its value is written back in excel. You must be making some mistake in putting the condition

Regards,
Amit

Hi Amit,

So Ive debugged and there aren’t any errors.

When I change my If statement from, CityTemperature < “10” to CityTemperature < “5”. The If statement runs and executes the if activity, but the If statement are not corresponding to the arguments.
So the temperatures above 5 are now being corresponded with the statement ‘its a hot day’, rather than the statement ‘its a cold day’.

Its very odd.

Any other suggestions that could help?

i used the convert.to.Int32 function in the statement which resolved the issue.

Thanks for your input Amit