Skip to main content
Content Starts Here

We've Moved!

Please note that we have moved to our New Forum site.


Ask Search:
Bevan EdwardsBevan Edwards 

Is it possible to provide a default search value in MyHistory

Is it possible to customise WDE to detect when the MyHistory view is displayed and then insert a value into the "filter" field?

Is it also possible to initiate a search via customisation?

Failing that, is there a way to perform a search and display the results in a custom view?

Jakub NemecJakub Nemec
In case, you wont to customize current/default MyHistory view, which can be little bit tricky.So, UCS is using the Apache Lucene for indexing, so you have to options:
  1. Use the direct access to the indexes and get data from it
  2. Use the UCS API (midle-layer between client and Apache Lucene SW) - RequestSearch method, etc.
HTH!

Regards,
--Jakub--
Bevan EdwardsBevan Edwards

Thanks Jakub.  I guess a more generic question is that if we know (from the documentation) what the name of a Region is in WDE, is it possible to access that Region and access/modify the controls within it?  There are other such controls that we would like to access.

Otherwise it looks like I'll have to implement a custom view and use the Interaction SDK (and/or Contacts SDK?) to access this information.

 

Bevan EdwardsBevan Edwards

I discovered this can be done with the following code:

IToolbarWindow tbWin = Genesyslab.Desktop.WPFCommon.Utils.FindAncestor<IToolbarWindow>(this);
object vwWP = vm.GetViewInRegion(tbWin, "ToolbarWorkplaceRegion", "MyWorkplaceContainerView");
object vwCH = vm.GetViewInRegion(vwMP, "ToolbarWorkplaceRegion", "MyContactHistory");
ContactHistoryView chView = (ContactHistoryView)vwCH;
System.Windows.Controls.TextBox tbSearch = (System.Windows.Controls.TextBox)chView.FindName("ValueBasicSearch");
tbSearch.Text = "MySearchValue";

Where vm is the ViewManager.

With appropriate null checks and error handling, of course.