Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Search NRS script query
Jan999
Hi,
I'm using FileSite 8.2 and I'd like to do the following:-
1. When the user opens the search screen I'd like to pre-populate the selected databases with the 'all databases' option.
2. I also want to pre-populate the client and matter fields with context based information from a workspace if one has been selected.
I've written a search.nrs script (see below) which copes with point 2 but I can't get the search databases to populate with an array of databases (I can do just the one fine).
Help!
Sub SearchDlg_OnInitDialog(dlg)
dlg.ClearAll
dlg.ClearAll
dim pworkspace 'As IManDocument
on error resume next
set pworkspace = Context("SelectedFolderObject")
dlg.SetAttributeValueByID nrDatabase,pworkspace.GetAttributeValueById(nrdatabase),true
dlg.SetAttributeValueByID nrClient,pworkspace.GetAttributeValueById(nrclient),true
dlg.SetAttributeValueByID nrMatter,pworkspace.GetAttributeById(nrmatter),true
End Sub
Thanks
Jan
Find more posts tagged with
Comments
JSakers
Hi Jan-
Here's one that does what you describe in point 1.
==========================================
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Search.nrs
'
' Set search dlg to search all served DBs on init.
'
' (c) Younts Consulting, 2006
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SearchDlg_OnInitDialog(dlg)
' Iterate through all attached DBs and compile a text string
For each d in dlg.NRTDMS.Sessions.Item(1).Databases
NameString = NameString + d.name + ","
next
NameString = left(NameString,len(NameString)-1)
' Apply that text string to the DB field, but leave the field editable
dlg.SetAttributeValueById 0, NameString, true
End Sub
==========================================
Hope that helps.
-John Sakers