Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Multiple Databases for Search Dialog
1tchy
Hi,
We are implementing two databases that have different sets of metadata in their custom fields. In the search dialog is there any way to automatically switch the database depending on which field is populated.
I have tried to update the Search Within field on the Search Dialog using an NRS scripts but cannot seem to update this field.
Any recommendations?
Find more posts tagged with
Comments
jny
It should work in scripting if you do something like this:
[search.nrs]
Sub SearchDlg_OnChange(dlg, id)
if 8 = id then '//example: check doc class
if dlg.GetAttributeByID(id) = "DOC" then '//Arbitrary example of a class value to check.
dlg.SetAttributeValueByID 0, "DB1", true '//Aribitrary example of database name to set.
else
dlg.SetAttributeValueByID 0, "DB2", true '//Aribitrary example of database name to set.
end if
end if
End Sub
1tchy
Thanks jny, that worked a treat.