Hello,
I am stuck and need help re Searching documents through custom params..
I am passing two string values through text boxes in my app and calling a function to open IIntegrationDlg to show results from search... but I m not sure how do I pass those two values as Search Params to IIntegrationDlg....
here is my code,
' Trusted login, dms As ManDMS and mySession As IManSession....
Dim pSrchParams As IManage.IManProfileSearchParameters
Dim pCtxItems As IMANEXTLib.ContextItems
Dim pSearchCmd As IMANEXTLib.SearchCmd
Dim hWnd As Long
pCtxItems = New IMANEXTLib.ContextItems
pCtxItems.Add("ParentWindow", hWnd)
pCtxItems.Add("NRTDMS", dms)
pCtxItems.Add("SelectedIManSession", mySession)
pSearchCmd = New IMANEXTLib.SearchCmd
pSearchCmd.Initialize(pCtxItems)
pSearchCmd.Update()
If pSearchCmd.Status = CommandStatus.nrActiveCommand Then
'pSearchCmd.Execute()
'pNRTDocs = pCtxItems.Item("SearchedNRTDocuments")
'pSrchParams = pCtxItems.Item("IManSearchParameters")
'ERR- Value does not fall within the expected range, with the following code.....
pSrchParams = pCtxItems.Item(imProfileAttributeID.imProfileCustom1)
pSrchParams.Add(imProfileAttributeID.imProfileCustom1, CStr(textbox.text))
'--------------------------------
Dim dlg As New DocOpenDlg
dlg.NRTDMS = dms
dlg.SingleSel = False
dlg.ShowContainedDocuments = pSrchParams
Dim commands(0) As String
commands(0) = "
@1@&View"
dlg.CommandList = commands
dlg.Show(dlg.Window)
Dim iCommandSelected As Long = dlg.CommandSelected
Dim selectedDox As Array = dlg.DocumentList
Dim iCount As Integer = selectedDox.Length
If (iCount > 0) And (iCommandSelected = 1) Then
Dim saDox(iCount - 1) As NRTDocument
selectedDox.CopyTo(saDox, 0)
Dim vcmd As New ViewCmd
pCtxItems.Add("SelectedNRTDocuments", saDox)
'pCtxItems.Add("TempDirectory", "C:\Temp1")
vcmd.Initialize(pCtxItems)
vcmd.Update()
If (vcmd.Status = CommandStatus.nrActiveCommand) Then
vcmd.Execute()
End If
End If
End If
Any help is more than appriciated..
Many thx in advance..
shahbm