public Sub GetTemplateInput(input As B4XInputTemplate) As ResumableSub
Dim m As Map
m.Initialize
Private Dialog As B4XDialog
Dialog.Initialize(Activity)
Wait For (Dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
' update stock item qty
m.Put("Result", input.text)
End If
Return m
End Sub