DIAdem Help

Collection: Conditions <DataFinder>

  • Updated2024-09-12
  • 3 minute(s) read

Collection: Conditions <DataFinder>

Collection of the search parameters for an advanced search in a DataFinder.

Note  Refer to the help page Properties - Overview for an overview of the the interface terms, the script name, and the meanings of the properties of files, groups, and channels. You need the language-neutral script name of a property when you use a script to search for the value of a property. You also can enter a query in the search input area in DIAdem NAVIGATOR and press <Ctrl-Shift-C> to find the script name of a property. Then DIAdem saves a script to the clipboard that also contains the script name of the property.

The following example determines whether the current query is an advanced search. The example then enters the name of each search condition in the logical operations line and uses an OR operation on each search condition:

VBScriptPython

 

Dim oMyQueryForm, Conditions, Condition, sLogic
Set oMyQueryForm = Navigator.Display.CurrDataFinder.QueryForm
If oMyQueryForm.Mode = eAdvancedQuery Then
  Set Conditions = oMyQueryForm.Conditions
  For Each Condition in Conditions
    If sLogic = "" Then
      sLogic = Condition.Name
    Else
      sLogic = sLogic & " OR " & Condition.Name
    End If
  Next
  Conditions.Logic = sLogic
End If

The following example removes all search conditions that search for a channel property. Otherwise the example displays the search condition:

VBScriptPython

 

Dim oMyDataFinder, oMyQuery, Conditions, Condition, Index
Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
Set oMyQuery = oMyDataFinder.LoadQuery(ConfReadPath & "Query_Example.tdq")
If oMyQuery.IsKindOf(eAdvancedQuery) Then
  Set Conditions = oMyQuery.Conditions
  Index = 1
  For Each Condition in Conditions
    If Condition.Type = eSearchChannel Then
      Conditions.Remove(Index)
    Else
      Call MsgBoxDisp (Condition.Property & Condition.Operator & Condition.Value)
      Index = Index +1
    End If
  Next
End If

Properties

Count | Logic

Methods

Add | Item | Remove | RemoveAll | Renumber

Log in to get a better experience