Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
If InputTemplate.Text.Contains(".") Then
If InputTemplate.Text > 99 Then
InputTemplate.Text = InputTemplate.Text.SubString2(0,3)
Else if InputTemplate.Text > 9 And InputTemplate.Text <=99 Then
InputTemplate.Text = InputTemplate.Text.SubString2(0,2)
Else
InputTemplate.Text = InputTemplate.Text.SubString2(0,1)
End If
ToastMessageShow("No fraction allowed. Use only integer values!", True)
End If