cancel
Showing results for 
Search instead for 
Did you mean: 

Type mismatch - parameterizing script routines

lbyrne
Contributor

Type mismatch - parameterizing script routines

In one script file called NewData I have the code below
The code that follows the dotted line is in a script file Basic and is being called from the script file called NewData

I am getting a type mismatch error.
I tried embedding the parameters in the subroutine called AddNewAttachmentCategory and it works.

Want to reuse same code and send in different parameters

What am I missing?

Thanks
Lynn


' USEUNIT Basic

Sub AddNewAttachmentCategoryRequiredFields

Call AddNewAttachmentCategory("REQUIRED","Attachment Category Required","","Yes","false")
Log.Message("Successful add of Attachment Category with Required Fields")

End Sub

-----------------------------------------------------------------------------------------------------------

Sub AddNewAttachmentCategory(AttachmentType,CategoryName,CategoryDescription,WebAccess,Disabled)

Call OpenScreen
Dim HSP_AdministratorTK
Dim frmAttachmentCategories
Dim groupBox
Dim toolkitTextbox

'AttachmentType = "REQUIRED"
'CategoryName = "Attachment Category"
'CategoryDescription =""
'WebAccess="Yes"
'Disabled = "false"
Set HSP_AdministratorTK = Aliases.HSP_AdministratorTK
Set frmAttachmentCategories = HSP_AdministratorTK.MDIForm.MdiClient.frmAttachmentCategories
Call frmAttachmentCategories.tspAttachmentCategories.ClickItem("New Attachment Categories")
Set groupBox = frmAttachmentCategories.splMain.SplitterPanel.splButtonBar.SplitterPanel.gbxProperties
Set toolkitTextbox = groupBox.txtCategoryName
Call toolkitTextbox.SetText(CategoryName)
Set toolkitTextbox = groupBox.txtCategoryDescription
Call toolkitTextbox.SetText(CategoryDescription)
Call groupBox.cboWebAccess.ClickItem(WebAccess)
if Disabled = "false" then
groupBox.ckbxDisabled.set_Checked(false)
else
groupBox.ckbxDisabled.set_Checked(true)
end if

groupBox.btnSave.ClickButton
HSP_AdministratorTK.dlgAddComplete.btnOK.ClickButton
'Tables.AttachmentCategories.Check
'DBTables.AttachmentCategories.Check
Call CloseScreen
End Sub
1 REPLY 1
lbyrne
Contributor

RE: Type mismatch - parameterizing script routines

Please close - error in useunit statement
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors