Using Query Filters in Scripts

<< Click to Display Table of Contents >>

 

Using Query Filters in Scripts

To setup and confirm whether a Query is correct is only one of the steps to use it. Runtime usage and changes on filter values defined for a Query can be checked in the next script. The SetVariableValue method is responsible for configuring a Query, according to values passed via script.

Set query = Screen.Item("E3Browser1").Item("Query1")
Query.SetVariableValue "IniDate", _
  Application.GetObject("Data.InternalTag1").Value
Query.SetVariableValue "FinalDate", _
  Application.GetObject("DataFH.InternalTag2").Value
Screen.Item("E3Browser1").Requery()

 

The Requery method allows the new Query parameters to be effectively used, as a new Query is executed by respecting these new values.

Was this page useful?