Excel cell value in If Action don't work

I have in excel cell with string value “Red”. Cell value is read to string variable “CarColor” in Get Cell Value Action.

In If Action first operand variable is “CarColor”, comparison operand is “Equals” and Second operator is “Red”.

If Action should execute Then block, but it always executes Else block.

I checked “CarColor” variable in Notepad window and it gets typed “Red”. I even used Trim Whitespace in variable, but it didn’t made any difference.

Is it possible that Get Cell Value action takes some hidden characters or what might be reason that in If Action “CarColor” = “Red” is not true?

-mikko

Mikko, could you please send your recording, we’ll have a look.

Thank you.

provisioraportit_Nets.rpae.zip (5.3 KB)

Thanks,

-mikko

I couldn’t find the actions where you use Get cell value and If-else. Could you specify the step number?

They are in steps 31 and 67.

Recording works fine except this one If action. Other values what are read from excel, work as they should.

I got it working. I switched first and second operator places and it started working. After that i changed them to original places, and it works now fine.

Before i tried to change second operator many times in excel sheet and in recording. So maybe there was some fault in first operator? I have picked it from variable list what popups when starting to type variable.

1 Like

Mikko, the reason must have been that the variable’s name was written without $ and brackets. I did not notice that at first.
And when you changed it, autocomplete added them.

Sorry, didn’t notice…Thanks again for help :slight_smile:

Our first serious recording has now gone to production. Just handled about 100 reports.

-mikko

Congratulations! :+1: