query = new query('Query name'); queryBuildDataSource = query.dataSourceTable(tableNum('table name')); queryBuildDataSource.clearRange(fieldNum('Table name','Field name')); queryBuildRange = queryBuildDataSource.addRange(fieldNum('Table name','Field name')); queryBuildRange.value(queryRange('Range values')); queryBuildRange.status();