How to save 4000 or 8000 or 10000 or n value as integer value in uipath as int32 is giving issue of " not a valid value for Int32." Please help

What should be data type here of that variable?

Error given by Orchestrator:

P.S> I am not asking to convert strng to integer. For e.g I am taking Get text activity and reading int value on screen but when it’s reading above 999 it’s throwing this issue.

I think that’s comma issue as 4,506 has comma that’s why.

Can someone help on that!

@anjasing

check it-
image

CInt(“4000”)… Try this

This will convert string to integer

@anjasing

Check this article->

@anjasing

You can directly store 4000 into a int32 variable. Can you share a screenshot of the error?

hi @anjasing

Convert.ToInt32(“10000”)

this will basically convert string to an integer

thanks

@anjasing Try removing comma(,) and check the results

1 Like

BUt it will come in form of comma only in system. I can’t remove that

@anjasing

Try -

cint("10,000".Replace(",","").Tostring.Trim)
1 Like

comma is working
grafik

But would recommend to trim the value as it comes from get text
CInt(YourVar.Trim())

1 Like

tried the same from my end and it worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.