IF condition with double variables not comparing properly

I have already converted both variables being compared into doubles and yet this IF condition is not working properly when comparing the 2 with a greater/less than.

HI,

Can you elaborate with specific data?

Regards,

1 Like

This comparison is between target price for a stock and the price the stock is currently sitting at.

Hi,

Can you try to set Breakpoint at the IF activity, and run debug mode?
Workflow will stop at the activity, then share screenshot of Locals panel which is displayed content of these variable.

Regards,

I am not familiar what is the locals panel?

HI,

Check the following image. It will appear when stop at breakpoint.

Regards,

The locals panel isn’t loading on my end and disappears as soon as the process hits the breakpoint.

Did you run as debug mode? And set valid breakpoint?

yes, here are all my variables in the variables tab. All of them cover the entire scope.

Nope. it’s necessary to know current value of each variable at Locals panel. Please share it.

image

1 Like

I cannot get the locals panel to work

Hi,

There is possiblity not to process the IF activity. For now, can you try to turn on ExecutionTrail then debug run? We can know which activity is processed.

Regards,

Can you try to set Breakpoint at the following IF?

Yes that is where I was putting the break and it doesn’t work there.

If you set breakpoint correctly, red filled circle will appear as the following.



From the above,the express in the condition will be True because checkTargetPrice(378.5) is larger than checkPrice(370.47) and analystRating is “Buy”. Isn’t this same with what you expect?

This is in a loop and 2 variables lower this is not the case and it is still saying “Buy”

Sorry but can you elaborate with specific data?