FieldName is the Variablename of your field! I don't know whats the content of your object.
If you need more help, paste some code. :-) Sorry but was that FieldNam e; or FieldName e; Dan --- On Tue, 7/8/08, Andreas Santoro <[EMAIL PROTECTED]<mailto:Andreas.Santoro%40plan-b-gmbh.com>> wrote: > From: Andreas Santoro <[EMAIL > PROTECTED]<mailto:Andreas.Santoro%40plan-b-gmbh.com>> > Subject: AW: AW: [flexcoders] Addressing ArrayCollection Data elements > Question > To: "[email protected]<mailto:flexcoders%40yahoogroups.com>" > <[email protected]<mailto:flexcoders%40yahoogroups.com>> > Date: Tuesday, July 8, 2008, 8:33 AM > try{ > fieldCol.text = dataArr[0].FieldName; > }catch(e:Error){} > > > > > Yes, I know the field name but I keep getting range error > and I know the value is there. but even when it isn't > how do I trap the error when the value requested returns an > array of zero elements? > Thanks for the help. > Dan Pride > The exact error is... > > RangeError: Index '0' specified is out of bounds. > at > mx.collections::ListCollectionView/getItemAt()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:422] > at > mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:696] > at Objects/findBasket2()[/Users/Lib/Documents/Flex Builder > 3/Gezer/src/ObjectsScript.as:199] > at > Objects/__findBasketButton_click()[/Users/Lib/Documents/Flex > Builder 3/Gezer/src/Objects.mxml:8] > > --- On Tue, 7/8/08, Andreas Santoro > <[EMAIL > PROTECTED]<mailto:Andreas.Santoro%40plan-b-gmbh.com><mailto:Andreas.Santoro%40plan-b-gmbh.com>> > wrote: > > > From: Andreas Santoro > <[EMAIL > PROTECTED]<mailto:Andreas.Santoro%40plan-b-gmbh.com><mailto:Andreas.Santoro%40plan-b-gmbh.com>> > > Subject: AW: [flexcoders] Addressing ArrayCollection > Data elements Question > > To: > "[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>" > <[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>> > > Date: Tuesday, July 8, 2008, 8:11 AM > > like this? > > > > fieldCol.text = dataArr[0].FieldName > > > > > > > > or you don't know the fieldname? > > > > > > > > fieldCol.text = dataArr[0]["{FieldNameVar}"] > > > > > > > > > > > > > > ________________________________ > > Von: > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com> > > > [EMAIL > PROTECTED]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>] > im Auftrag von Dan Pride > > > [EMAIL > PROTECTED]<mailto:danielpride%40yahoo.com><mailto:danielpride%40yahoo.com>] > > Gesendet: Dienstag, 8. Juli 2008 13:49 > > An: > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com> > > Betreff: [flexcoders] Addressing ArrayCollection Data > > elements Question > > > > > > Hi > > I am using the create app from database to create an > xml > > interface with a lamp back end. It works great of > course > > and is a great intro tool. > > > > I am trying to adapt it to pull a single set of values > in > > response to a query without using a datagrid to catch > the > > data. > > > > I can't for the life of me figure out how to > address > > the elements. > > The query is returning zero or one record, and I want > to > > grab the field values and fill in text fields. > > i.e. fieldCol.text = dataArr ???? > > Thanks > > Dan Pride > > This board is awesome, and my thanks to all those up > here > > who respond.

