How to Search and Zoom programmatically ( with Webapp Builder v1.2)

2536
2
Jump to solution
09-15-2015 03:04 PM
SowjanyaSunkara3
New Contributor III

Whatever the Search Widget does after configuration, can it be done behind the scenes?

1.Can I setup a search Widget to read from a Config file (lets say, config file has Map service URLs, Field to search on)

2. And then search and zoom ( by calling the Search/Find Dijit?)

0 Kudos
1 Solution

Accepted Solutions
ZeZhengLi
Occasional Contributor

Sowjanya,

     I think you can use search widget to search something behind the scenes like this code snippet.

searchWidgets = widgetManager.getWidgetsByName("Search");

if (searchWidgets.length > 0) {

  var search1 = searchWidgets[0];

  if (search1 && search1.searchDijit) {

  search1.searchDijit.search(text);

  }

}

View solution in original post

2 Replies
ZeZhengLi
Occasional Contributor

Sowjanya,

     I think you can use search widget to search something behind the scenes like this code snippet.

searchWidgets = widgetManager.getWidgetsByName("Search");

if (searchWidgets.length > 0) {

  var search1 = searchWidgets[0];

  if (search1 && search1.searchDijit) {

  search1.searchDijit.search(text);

  }

}

View solution in original post

SowjanyaSunkara3
New Contributor III

Thank you!

0 Kudos