I recently tried this lotus script from internet, to add fields and get the input.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim celsius As String
Set uidoc = workspace.CurrentDocument
x = uidoc.FieldGetText( "Field_F" )
celsius = (x-32)*(5/9)
Call uidoc.FieldSetText("Field_C", celcius)
End Sub
When I execute I get type mis match error since the input i give is number and Variable celsius is declared as String.
Can any one tell what is wrong..
I know its something obvious but still i could’nt find since i m new to lotus notes.
You’re not being consistent in your spelling of variables,
Dim celsius As String
Dim celsiusvalue As Double
celsius = Str$(celciusvalue)
Call uidoc.FieldSetText(“Field_C”, celcius)
Note spelling of celsius/celcius.
Use Option Declare in Options to avoid this, it’ll catch the miss spellings as variable not declared.