Variables int32 and GenericValue

i don’t know how to calculate this, is it variable the problem?

message box error on the left side showed up when i change “dt2” variable into integer
message box error on the right side showed up when i change “dt2” variable into GenericValue

“dt2” is the variabel output from “Jumlah Tagihan (2)” same like “Jumlah Tagihan (3)”
activties that i’m using to take data is “Get Full Text”

what is the variable type of dt2 ? For message type to be able to display it needs to be string

use .Tostring function to convert from a different variable type to string , so that it be displayed in message box

how if i want to show in message box dt2 - dt1? what variable am i using?

Please try (dt2 - dt1).ToString in message box

check the variables pane at the bottom of the studio. It shows your variable name and type there

still can’t

yea i know how to check variables, but idk how to calculate 2 data from “get full text”

Get Full text gives string as output. You will first need to convert to Int32. Do that for both your cases

use Convert.ToInt32(dt1) in assign to get it as an int variable

Then when both variables are int you perform the subtraction in assign activity and store the result in another int variable (or directly convert the result as string in the same assign)

Finally if if your result variable is already string then use that in message box. Else use .tostring to convert it to string from int


Both the d1 and d2 should be integer. Please convert to integer before subtraction.

1 Like

is it correct? when i try to change the var of “dt1” and “dt2” on the variables pane at the bottom of the studio the error says ‘ToInt32’ is not a member of ‘String’

the method is >> Convert.ToInt32(dt1) not Toint


still, am i miss something?

Please Read This:

and this:

ok, i’ve try "Int32.Parse(dt1), "Integer.Parse(dt1) it fail and the output was Input string was not in a correct format
i’m try to use “CInt(dt1)” and the output is Cannot convert Generic Value to System.Int32

your dt1 variable type is generic. change that to string :slight_smile:

i’ve tried before, the output was Conversion from string “” to type ‘Integer’ is not valid

upload your workflow here please the part where you are getting the error

Exercise.xaml (23.6 KB)

is it problem if the format number that i take like this “424.300,00”?

Exercise_Edited.xaml (23.3 KB)

Added variables for that part… no errors for me…