Hi, Here is the lookup I using. public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange ; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(ProjTable), this); str rangeStr; ; sysTableLookup.addLookupField(fieldNum(ProjTable, ProjId)); queryBuildDataSource = query.addDataSource(tableNum(ProjTable)); queryBuildRange = queryBuildDataSource.addRange(fieldNum(ProjTable, RecId)) ; //queryBuildDataSource.addRange(fieldNum(ProjTable, parentId)).value(''); //queryBuildDataSource.range(2).addRange(fieldId2Ext(fieldnum(ProjTable, sortingId),1)).value('PLANT'); rangeStr = strfmt("'((%1 == %3))' + '&& (%2 == %4))'", fieldId2Ext(fieldnum(ProjTable, sortingId),1),fieldNum(ProjTable,ParentID), 'PLANT',""); queryBuildRange.value(rangeStr); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } I want to build the query with AND Range... Equivalent select statement.. While select projTable where ProjTable.ParentID == '" and projTable.sortindID[1] == 'PLANT' what is the quivalent in addrange... The reocrds are no getting filtered and I get all the reocrds...How can I achive this..on the Table level. My form has no data source.... I am not able to do AND in AddRange firleds.. please help help help Padmaja,
--------------------------------- Bring words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail. [Non-text portions of this message have been removed] Sharing the knowledge on Axapta. Visit www.frappr.com/axapta for axapta friends. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Axapta-Knowledge-Village/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/