Problem with conversion from string value to number value

Hi Team,

Currently we are getting error when we try to convert string value to number value.

We use this conversion in below format
Using 2 Clipboard actions
1 - Copy variable value to clipboard (String)
2- Set variable FROM clipboard: (num)
but we are getting error on second step.

You can get an error due to lack of type casting, i.e. when setting a string value to a number variable or when a value being set contains the invalid decimal separator.
Please let us know what value you’re trying to copy and set?

we are taking 2 as a string from OCR we need to convert it into number.


See the example below:

If you have some error, then the OCR action returned some additional symbols (spaces, etc.). You can try to use the Trim Whitespace action -

Or make the OCR area smaller.


Our OCR area is very small as you can see below ::

Also when we print this string on notepad, we are getting 2 as string without any space.
So, again tried the same thing for conversion and getting below error.

what is the purpose of the action #5? Maybe try to disable it.

Disabled that step then also getting the same error:

Try to paste your clipboard content to Word and enable the hidden formatting symbols. You will get something like this:

Currently, our Trim Whitespace is not trimming this symbol (or other garbage symbols returned by OCR). We will introduce the Trim by Regexp in one of the next releases.

as a workaround, you can remove the first symbol from your string

Thanks @azinchuk,

This workaround is helping me to read my number :slight_smile:

Hi @azinchuk,

Can you please let me know in which release, “Trim by Regexp” will introduce.

When I take smaller part( i.e, 1 digit) for OCR, it runs fine but if i take bigger part( i.e, 3 or 4 digit number) for OCR, it throws error.
I removed the first symbol from my string then also it wouldn’t work :frowning:

Thanks for your idea! Cannot tell you the exact date, but we will definitely implement this improvement. Your votes can speed up this process.