Hi girac, Try this statement: qbds.addRange( fieldNum( PurchTable, PurchStatus) ).value(queryvalue(purchstatus: :BackOrder) );
if not then please post bout d solution u came out wid......... regards, Sanjiv --- In Axapta-Knowledge-Village@yahoogroups.com, Anitha S <mail2eani...@...> wrote: > > girac, > Can u send in ur code.. then we can check wats wrong with it... > Regards, > Anitha > On Tue, Aug 25, 2009 at 8:25 PM, giarc 127 <girac...@...> wrote: > > > > > > > > > Hello all, > > When I use the suggested code I get an error saying my variable Purchstatus > > is not declared, I declared this, but getting an error. > > How does this need to be declared? > > > > regards, > > ------------------------------ > > *From:* sreenath reddy <shysrin...@...> > > *To:* Axapta-Knowledge-Village@yahoogroups.com > > *Sent:* Tuesday, August 25, 2009 5:39:59 AM > > *Subject:* Re: [Axapta-Knowledge-Village] Displaying Records On Form From > > Query > > > > > > > > > > Hi, > > > > try using > > > > qbds.addRange( fieldNum( PurchTable, PurchStatus) ).value(enum2str > > (purchstatus: :BackOrder) ); > > > > regards, > > sreenath > > > > > > --- On *Tue, 8/25/09, girac127 <girac...@yahoo. com>* wrote: > > > > > > From: girac127 <girac...@yahoo. com> > > Subject: [Axapta-Knowledge- Village] Displaying Records On Form From Query > > To: Axapta-Knowledge- vill...@yahoogro ups.com > > Date: Tuesday, August 25, 2009, 12:07 AM > > > > > > > > Good day all. > > > > My requirement is to display only records where the PurchStatus =1 on > > a new PO detail form which I have in place. > > > > I have the following code in the init Datasource(Purchtab le) Method. What > > am I missing to have this execute? > > > > public void init() > > { > > Query q = new Query(); > > QueryBuildDataSourc e qbds; > > > > ; > > super(); > > qbds = q.addDataSource( tableNum( PurchTable) ); > > qbds.addRange( fieldNum( PurchTable, PurchStatus) ).value("1"); > > > > info(qbDS.toString( )); > > > > } > > > > I have the info displaying my correct query, but I am returning > > results other than the value of "1" > > > > > > > > > > >