Putting data in search fields

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:34

This topic explains how to initialize search fields from scripting in navigator or search dialog boxes.

In the first two examples we want to put content in the Title, Edition and Library fields on the search panes on the Pages navigator and Library navigators of the Pages main tab.

Click to toggle expandExample 1 (only for referenced values): using a list of values
Click to toggle expandExample 2 (only for referenced values): using a single value
Click to toggle expandExample 3 (only for full text search and only on the Shell main tab)

In this example, we want to initialize the "Name" field with the "z" string in a search dialog box that searches for txt objects, and execute the search:

   Dim dlg As New SelectObjDialog(win)

 dlg.SearchCriteria.SearchSettings = New SearchSettingList() From {

        New SearchSetting() With {.Path = "[txt.name]".FromValue = "z", .Op = OpCode.Starting, .IdList = New List(Of IdName)}

      }

In this example, we want to initialize the "Name" field with the "z" string and the folder drop-down box with the id = 3446 in a search dialog box that searches for txt objects, and execute the search:

    Dim dlg As New SelectObjDialog(win)

    dlg.SearchCriteria.SearchSettings = New SearchSettingList() From {

      New SearchSetting() With {.Path = "[txt.name]", .FromValue = "z", .Op = OpCode.Starting, .IdList = New List(Of IdName)},

      SearchSetting.CreateReference("[txt.folderRef]", New Integer() {3446})

    }

See also

Getting data from navigator search fields