Sample Messaging in a Mongoose Form Script Method

Public Function IssueDoubleCheck() As Integer

dim bIsReceived as Boolean

dim bIsMiscIssued as Boolean

dim strItem as string

' .EntryNumber

Dim strTagNo as string

Dim strMsg as string

strTagNo = ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("EntryNumber")

strMsg = "Please first save the 3M Owned Log Tag#: [" + strTagNo + "], and then retry."

If ThisForm.PrimaryIDOCollection.IsCurrentObjectModified Then

IssueDoubleCheck=Cint(ThisForm.CallGlobalScript( _

"MsgApp", "Clear", "Prompt", "SuccessFailure", _

"mI=Msg", "~LIT~(" + strMsg + ")", _

"", "", "", "", "", "", "", "", "", "", "", "", "", "", ""))

IssueDoubleCheck = 16

exit function

end if

strItem = ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("Item")

if String.IsNullOrEmpty(strItem) then

IssueDoubleCheck = CInt(ThisForm.CallGlobalScript( _

"MsgApp", _

"Clear", _

"Prompt", _

"SuccessFailure", _

"mW=MaynotBlank", _

"@sItem", _

"", "", "", "", "", "", "", "", "", "", "", "", "", "", ""))

IssueDoubleCheck = 16

exit function

end if

bIsReceived = (ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("IsMiscRcvd") = "1" )

bIsMiscIssued = (ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("IsMiscIssued") = "1" )

if bIsMiscIssued = true then

ThisForm.CallGlobalScript("MsgApp", "Clear", "Prompt", "SuccessFailure", "mI=Msg", "A [Misc Issue] has already been performed.", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")

IssueDoubleCheck = 16

exit function

end if

if bIsReceived = false then

ThisForm.CallGlobalScript("MsgApp", "Clear", "Prompt", "SuccessFailure", "mI=Msg", "A [Misc Issue] is prohibited prior to a [Misc Receipt]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")

IssueDoubleCheck = 16

exit function

end if

If ThisForm.PrimaryIDOCollection.IsCurrentObjectPropertyModified("DispositionCode") Then

ThisForm.CallGlobalScript("MsgApp", "Clear", "Prompt", "SuccessFailure", "mI=Msg", "Save the Tag / Disposition and Retry", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")

IssueDoubleCheck = 16

exit function

end if

IssueDoubleCheck= CInt(ThisForm.CallGlobalScript("MsgApp", "Clear", "Prompt", "SuccessFailure", _

"mQ=CmdPerformNoYes", _

"Miscellaneous Issue", _

"", "", "", "", "", "", "", "", "", "", "", "", "", "", ""))

End Function

Jon Bossman