Type into inserting wrong values

Type into inserting wrong values .instead of tying 9378.07 it is typing 9378.07000000000002.
image

Hey @SSD can you try to Enable and use simulate or send window message option it type into and then check .

cheers

Type into is just an activity, it will type in the selected area whatever you give it to type, it can be application’s issue, or you can try Set Text instead.

Hi @SSD

There is different scenarios on this,

  1. Might be the Input is 9378.07000000000002 if you want to type this value 9378.07. Then use the below expression in Type into activity,
Math.Round(CDbl("9378.07000000000002"), 2).toString
  1. If Type into typing like this use the Set Text activity.
  2. It can be the issue of Application, when we enter one value it will change to other value, try typing manually and check the behavior of the application

Hope it helps!!

@SSD

Try to print the value and check may be it is typing the value shown above

Cheers

Are you passing the type into value as a variable. If you are passing variable - see the type of variable. It could be due to the decimal count in the variable. Limit to 2 and try again


This issue occurs because floating-point numbers cannot always be represented precisely in computers, and certain operations or manipulations may lead to these small errors.

You can round the number to 2 decimal places using the Math.Round function:

Assign Activity:
Use the Assign activity to round the number.
Example:
yourVariable = Math.Round(yourVariable, 2)
This will round the number to 2 decimal places.

Example Workflow:
Assign: inputValue = 9378.07000000000002
Assign: roundedValue = Math.Round(inputValue, 2)
Now, roundedValue will have the value 9378.07 instead of 9378.07000000000002.

thanks this worked for me

It’s my pleasure… @SSD

Make my post Mark as solution to close the loop.

Happy Automation!!