GetE3QueryFields

<< Click to Display Table of Contents >>

 

GetE3QueryFields

GetE3QueryFields()

This method returns a Fields Collection (columns) of a Query. Every item on that Collection contains properties that can be modified, as described on topic Query Field. The next script contains an example of using this method.

Sub Button1_Click()
  ' Traverses the Fields Collection,
  ' displaying the fields on a message box,
  ' and also setting them as visible
  ' on Query's configuration
 
  Set Browser = Screen.Item("E3Browser")
  Set Query = Browser.Item("Query")
  Set Fields = Query.GetE3QueryFields()
  For Each field In Fields
    MsgBox CStr(field.TableName) & "-" & CStr(field.ColumnName)
    field.Visible = True
  Next
  ' Performs E3Browser's Query again, which has been
  ' just modified, so that all fields appear.
  Browser.RetrieveE3QueryFields()
  Browser.Requery()
End Sub

 

NOTE

To use this method, the Query must be previously created at design time.

Was this page useful?