E3 Query using scripts

HI,

Iam using E3 2.5 version. I added a query in the screen. I wanted to list the query feilds in the list box using e3 script. Can u please let me how this work out. I followed the manual but it gives me script error

Dear @pavan211,

You can use the method GetE3QueryFields. For example:

Sub ListBox1_OnStartRunning()
	Clear()
	set fields = Screen.Item("Query1").GetE3QueryFields()
	for each field in fields
		AddItem field.ColumnName
	next
End Sub