PostRecalc - accidentally submitted twice - ignore

I’ve been having problems with a specific issue. I am trying to set a default value from a computed field using the postrecalc event hoping it will help a inputvalidation issue.I have the following formula in a postrecalc event:

Sub Postrecalc(Source As Notesuidocument)

Dim location As Integer

location = source.FieldGetText( "FieldValue4" )

Call source.FieldSetText( "FieldValue5", FieldValue4 )

End Sub

I need to set the field using Integers and I realize FieldSetText won’t work because that looks for a string. My brain seems to be frozen because I can’t figure out how to set the field as an Integer.

Can anybody help?

Thanks!